
import Database.save_puzzle;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JLayeredPane;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableModel;


public class Admin extends javax.swing.JFrame {

    /** Creates new form admin */
        Object[][] con4=new Object[4][4];
    Object[] head4={"A","B","C","D"};
         Object[][] con6=new Object[6][6];
    Object[] head6={"A","B","C","D","E","F"};
    String acctype="";
    ArrayList temp_puzzle=new ArrayList();
    ArrayList temp_ques=new ArrayList();
    int edit_id=0;
        boolean[][] canEdit;
     boolean[][] canEdit4;
    public Admin() {
        initComponents();
        this.set_show_main();
    }

    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        login = new javax.swing.JDialog();
        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        log_t1 = new javax.swing.JTextField();
        log_t2 = new javax.swing.JPasswordField();
        log_t3 = new javax.swing.JComboBox();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        acc_add = new javax.swing.JDialog();
        jLabel8 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        acc_add_t1 = new javax.swing.JTextField();
        acc_add_t2 = new javax.swing.JTextField();
        jButton4 = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        jButton6 = new javax.swing.JButton();
        jLabel12 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        acc_add_t3 = new javax.swing.JTextArea();
        jLabel14 = new javax.swing.JLabel();
        acc_add_t4 = new javax.swing.JComboBox();
        acc_detail = new javax.swing.JDialog();
        jLabel13 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        acc_de_s1 = new javax.swing.JComboBox();
        jScrollPane2 = new javax.swing.JScrollPane();
        jPanel4 = new javax.swing.JPanel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        acc_de_t1 = new javax.swing.JLabel();
        acc_de_t2 = new javax.swing.JLabel();
        acc_de_t3 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        acc_de_t4 = new javax.swing.JLabel();
        jButton7 = new javax.swing.JButton();
        acc_mana = new javax.swing.JDialog();
        jLabel24 = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        jLabel26 = new javax.swing.JLabel();
        acc_ma_s1 = new javax.swing.JComboBox();
        jButton9 = new javax.swing.JButton();
        jPanel6 = new javax.swing.JPanel();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        acc_ma_t1 = new javax.swing.JTextField();
        acc_ma_t2 = new javax.swing.JTextField();
        jScrollPane4 = new javax.swing.JScrollPane();
        acc_ma_t3 = new javax.swing.JTextArea();
        acc_ma_t4 = new javax.swing.JComboBox();
        acc_ma_b1 = new javax.swing.JButton();
        acc_ma_b2 = new javax.swing.JButton();
        jButton11 = new javax.swing.JButton();
        bg_new4 = new javax.swing.ButtonGroup();
        bg_new6 = new javax.swing.ButtonGroup();
        edit_queofpuzzle = new javax.swing.JDialog();
        jPanel18 = new javax.swing.JPanel();
        jLabel52 = new javax.swing.JLabel();
        jScrollPane25 = new javax.swing.JScrollPane();
        edit_ques_ta = new javax.swing.JTable();
        jLabel53 = new javax.swing.JLabel();
        jLabel54 = new javax.swing.JLabel();
        jScrollPane26 = new javax.swing.JScrollPane();
        edit_ques_t1 = new javax.swing.JTextPane();
        jScrollPane27 = new javax.swing.JScrollPane();
        edit_ques_t2 = new javax.swing.JTextPane();
        jLabel55 = new javax.swing.JLabel();
        jButton13 = new javax.swing.JButton();
        jButton32 = new javax.swing.JButton();
        edit_que_lab = new javax.swing.JLabel();
        jLabel56 = new javax.swing.JLabel();
        edit_que_lab2 = new javax.swing.JLabel();
        jButton3 = new javax.swing.JButton();
        jPanel22 = new javax.swing.JPanel();
        jButton28 = new javax.swing.JButton();
        jButton30 = new javax.swing.JButton();
        jButton31 = new javax.swing.JButton();
        acc_1 = new javax.swing.JButton();
        acc_2 = new javax.swing.JButton();
        acc_3 = new javax.swing.JButton();
        main = new javax.swing.JPanel();
        jLabel50 = new javax.swing.JLabel();
        jLabel82 = new javax.swing.JLabel();
        main_lab = new javax.swing.JLabel();
        puz_mama = new javax.swing.JLayeredPane();
        jScrollPane12 = new javax.swing.JScrollPane();
        edit_table = new javax.swing.JTable();
        jLabel81 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jButton29 = new javax.swing.JButton();
        jButton36 = new javax.swing.JButton();
        jButton37 = new javax.swing.JButton();
        jLabel33 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        edit_con = new javax.swing.JTextArea();
        edit_4 = new javax.swing.JLayeredPane();
        jPanel25 = new javax.swing.JPanel();
        jLabel83 = new javax.swing.JLabel();
        jLabel84 = new javax.swing.JLabel();
        jLabel86 = new javax.swing.JLabel();
        jLabel87 = new javax.swing.JLabel();
        ecom_4_t1 = new javax.swing.JLabel();
        ecom_4_t2 = new javax.swing.JLabel();
        ecom_4_t3 = new javax.swing.JLabel();
        ecom_4_t4 = new javax.swing.JLabel();
        jLabel93 = new javax.swing.JLabel();
        jLabel94 = new javax.swing.JLabel();
        jScrollPane15 = new javax.swing.JScrollPane();
        ecom_4_i1 = new javax.swing.JTextArea();
        jLabel95 = new javax.swing.JLabel();
        jPanel26 = new javax.swing.JPanel();
        jButton38 = new javax.swing.JButton();
        jButton39 = new javax.swing.JButton();
        jButton40 = new javax.swing.JButton();
        jScrollPane13 = new javax.swing.JScrollPane();
        jScrollPane14 = new javax.swing.JScrollPane();
        edit_table_list = new javax.swing.JList();
        jScrollPane16 = new javax.swing.JScrollPane();
        edit_4_4 = new javax.swing.JTable();
        jPanel9 = new javax.swing.JPanel();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        edit_6 = new javax.swing.JLayeredPane();
        jPanel27 = new javax.swing.JPanel();
        jLabel97 = new javax.swing.JLabel();
        jLabel98 = new javax.swing.JLabel();
        jLabel100 = new javax.swing.JLabel();
        jLabel101 = new javax.swing.JLabel();
        ecom_6_t1 = new javax.swing.JLabel();
        ecom_6_t2 = new javax.swing.JLabel();
        ecom_6_t3 = new javax.swing.JLabel();
        ecom_6_t4 = new javax.swing.JLabel();
        jLabel107 = new javax.swing.JLabel();
        jLabel108 = new javax.swing.JLabel();
        jScrollPane17 = new javax.swing.JScrollPane();
        ecom_6_i1 = new javax.swing.JTextArea();
        jLabel109 = new javax.swing.JLabel();
        jPanel28 = new javax.swing.JPanel();
        jButton41 = new javax.swing.JButton();
        jButton42 = new javax.swing.JButton();
        jButton43 = new javax.swing.JButton();
        jScrollPane18 = new javax.swing.JScrollPane();
        jScrollPane19 = new javax.swing.JScrollPane();
        edit_table_list6 = new javax.swing.JList();
        jScrollPane20 = new javax.swing.JScrollPane();
        edit_6_6 = new javax.swing.JTable();
        jPanel10 = new javax.swing.JPanel();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        jLabel41 = new javax.swing.JLabel();
        jLabel42 = new javax.swing.JLabel();
        jLabel43 = new javax.swing.JLabel();
        new4 = new javax.swing.JLayeredPane();
        jPanel29 = new javax.swing.JPanel();
        jLabel110 = new javax.swing.JLabel();
        jLabel111 = new javax.swing.JLabel();
        jLabel113 = new javax.swing.JLabel();
        new4_la1 = new javax.swing.JLabel();
        new4_la2 = new javax.swing.JLabel();
        jLabel117 = new javax.swing.JLabel();
        jLabel118 = new javax.swing.JLabel();
        jScrollPane21 = new javax.swing.JScrollPane();
        ta_4_4 = new javax.swing.JTable();
        jButton44 = new javax.swing.JButton();
        jButton45 = new javax.swing.JButton();
        jPanel30 = new javax.swing.JPanel();
        jLabel119 = new javax.swing.JLabel();
        jScrollPane22 = new javax.swing.JScrollPane();
        new4_t1 = new javax.swing.JTextArea();
        jLabel120 = new javax.swing.JLabel();
        new4_t2 = new javax.swing.JTextField();
        jPanel31 = new javax.swing.JPanel();
        new4_a = new javax.swing.JRadioButton();
        new4_b = new javax.swing.JRadioButton();
        save4_que = new javax.swing.JButton();
        jButton47 = new javax.swing.JButton();
        posi = new javax.swing.JLabel();
        jPanel32 = new javax.swing.JPanel();
        jButton48 = new javax.swing.JButton();
        jButton49 = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        new6 = new javax.swing.JLayeredPane();
        jLabel129 = new javax.swing.JLabel();
        jScrollPane23 = new javax.swing.JScrollPane();
        ta_6_6 = new javax.swing.JTable();
        jButton50 = new javax.swing.JButton();
        jButton51 = new javax.swing.JButton();
        jPanel34 = new javax.swing.JPanel();
        jLabel130 = new javax.swing.JLabel();
        jScrollPane24 = new javax.swing.JScrollPane();
        new6_t1 = new javax.swing.JTextArea();
        jLabel131 = new javax.swing.JLabel();
        new6_t2 = new javax.swing.JTextField();
        jPanel35 = new javax.swing.JPanel();
        new6_a = new javax.swing.JRadioButton();
        new6_b = new javax.swing.JRadioButton();
        save6_que = new javax.swing.JButton();
        jButton53 = new javax.swing.JButton();
        posi_2 = new javax.swing.JLabel();
        jPanel36 = new javax.swing.JPanel();
        jButton54 = new javax.swing.JButton();
        jButton55 = new javax.swing.JButton();
        jPanel8 = new javax.swing.JPanel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jPanel33 = new javax.swing.JPanel();
        jLabel112 = new javax.swing.JLabel();
        jLabel114 = new javax.swing.JLabel();
        jLabel115 = new javax.swing.JLabel();
        new6_la1 = new javax.swing.JLabel();
        new6_la2 = new javax.swing.JLabel();
        jLabel121 = new javax.swing.JLabel();

        login.setTitle("Cross Word Puzzle Admin Login");
        login.setBackground(java.awt.Color.pink);

        jPanel1.setBackground(new java.awt.Color(102, 102, 102));

        jLabel2.setBackground(new java.awt.Color(102, 102, 102));
        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 18));
        jLabel2.setForeground(new java.awt.Color(0, 102, 255));
        jLabel2.setText("Cross Word Puzzle Admin Login");

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/login.png"))); // NOI18N

        jPanel2.setBackground(new java.awt.Color(102, 102, 102));
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Login", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), new java.awt.Color(0, 0, 255))); // NOI18N

        jLabel4.setText("Username");

        jLabel5.setText("Password");

        jLabel6.setText("Type login");

        log_t1.setBackground(new java.awt.Color(204, 204, 204));

        log_t2.setBackground(new java.awt.Color(204, 204, 204));

        log_t3.setBackground(new java.awt.Color(204, 204, 204));
        log_t3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Root Admin", "Admin" }));

        jButton1.setBackground(new java.awt.Color(204, 204, 204));
        jButton1.setText("Login");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setBackground(new java.awt.Color(204, 204, 204));
        jButton2.setText("Exit");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addComponent(jLabel5)
                            .addComponent(jLabel6))
                        .addGap(9, 9, 9)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(log_t3, 0, 133, Short.MAX_VALUE)
                            .addComponent(log_t2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
                            .addComponent(log_t1, javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE))
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(16, 16, 16))))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(log_t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(13, 13, 13)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(log_t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(log_t3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)
                    .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel3)
                .addGap(18, 18, 18)
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap(43, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(69, 69, 69)
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(77, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(34, 34, 34)
                        .addComponent(jLabel3))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(27, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout loginLayout = new javax.swing.GroupLayout(login.getContentPane());
        login.getContentPane().setLayout(loginLayout);
        loginLayout.setHorizontalGroup(
            loginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(loginLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        loginLayout.setVerticalGroup(
            loginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(loginLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        acc_add.setTitle("Create account");
        acc_add.setBackground(new java.awt.Color(102, 102, 102));

        jLabel8.setFont(new java.awt.Font("Tahoma", 0, 18));
        jLabel8.setForeground(new java.awt.Color(0, 0, 204));
        jLabel8.setText("Create Account");

        jLabel10.setText("Login name");

        jLabel11.setText("Login password");

        acc_add_t1.setBackground(new java.awt.Color(204, 204, 204));

        acc_add_t2.setBackground(new java.awt.Color(204, 204, 204));

        jButton4.setText("Create");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        jButton5.setText("Exit");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        jButton6.setText("Reset");
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton6ActionPerformed(evt);
            }
        });

        jLabel12.setText("Note");

        jScrollPane3.setForeground(new java.awt.Color(102, 102, 102));

        acc_add_t3.setBackground(new java.awt.Color(204, 204, 204));
        acc_add_t3.setColumns(20);
        acc_add_t3.setRows(5);
        jScrollPane3.setViewportView(acc_add_t3);

        jLabel14.setText("Account type");

        acc_add_t4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Root Admin", "Admin" }));
        acc_add_t4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                acc_add_t4ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout acc_addLayout = new javax.swing.GroupLayout(acc_add.getContentPane());
        acc_add.getContentPane().setLayout(acc_addLayout);
        acc_addLayout.setHorizontalGroup(
            acc_addLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(acc_addLayout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addGroup(acc_addLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel10)
                    .addComponent(jLabel11)
                    .addComponent(jLabel12)
                    .addComponent(jLabel14))
                .addGap(41, 41, 41)
                .addGroup(acc_addLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane3)
                    .addComponent(acc_add_t2, javax.swing.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE)
                    .addComponent(acc_add_t1, javax.swing.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE)
                    .addComponent(acc_add_t4, 0, 166, Short.MAX_VALUE))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, acc_addLayout.createSequentialGroup()
                .addContainerGap(37, Short.MAX_VALUE)
                .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton6)
                .addGap(27, 27, 27)
                .addComponent(jButton5)
                .addGap(50, 50, 50))
            .addGroup(acc_addLayout.createSequentialGroup()
                .addGap(89, 89, 89)
                .addComponent(jLabel8)
                .addContainerGap(101, Short.MAX_VALUE))
        );
        acc_addLayout.setVerticalGroup(
            acc_addLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(acc_addLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel8)
                .addGap(18, 18, 18)
                .addGroup(acc_addLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(acc_add_t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(acc_addLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(acc_add_t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(acc_addLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel12)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(14, 14, 14)
                .addGroup(acc_addLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(acc_add_t4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE)
                .addGroup(acc_addLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton4)
                    .addComponent(jButton6)
                    .addComponent(jButton5))
                .addContainerGap())
        );

        acc_detail.setTitle("Account login detail");
        acc_detail.setAlwaysOnTop(true);
        acc_detail.setBackground(new java.awt.Color(102, 102, 102));

        jLabel13.setBackground(new java.awt.Color(102, 102, 102));
        jLabel13.setFont(new java.awt.Font("Times New Roman", 0, 18));
        jLabel13.setForeground(new java.awt.Color(51, 0, 204));
        jLabel13.setText("Account Login Detail");

        jLabel15.setText("Account ID");

        acc_de_s1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                acc_de_s1ItemStateChanged(evt);
            }
        });
        acc_de_s1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                acc_de_s1ActionPerformed(evt);
            }
        });

        jPanel4.setBackground(new java.awt.Color(204, 204, 204));
        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Account detail"));
        jPanel4.setForeground(new java.awt.Color(102, 102, 102));

        jLabel16.setText("Account ID");

        jLabel17.setText("Account Password");

        jLabel19.setText("Note");

        acc_de_t1.setText("NULL");

        acc_de_t2.setText("NULL");

        acc_de_t3.setText("NULL");

        jLabel20.setText("Account Type");

        acc_de_t4.setText("NULL");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel16)
                    .addComponent(jLabel17)
                    .addComponent(jLabel20)
                    .addComponent(jLabel19))
                .addGap(35, 35, 35)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(acc_de_t4)
                    .addComponent(acc_de_t1)
                    .addComponent(acc_de_t2)
                    .addComponent(acc_de_t3))
                .addContainerGap(159, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(acc_de_t1))
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(acc_de_t2))
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(acc_de_t3)
                    .addComponent(jLabel19))
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel20)
                    .addComponent(acc_de_t4))
                .addContainerGap())
        );

        jScrollPane2.setViewportView(jPanel4);

        jButton7.setText("Exit");
        jButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton7ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout acc_detailLayout = new javax.swing.GroupLayout(acc_detail.getContentPane());
        acc_detail.getContentPane().setLayout(acc_detailLayout);
        acc_detailLayout.setHorizontalGroup(
            acc_detailLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, acc_detailLayout.createSequentialGroup()
                .addGroup(acc_detailLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, acc_detailLayout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 330, Short.MAX_VALUE))
                    .addGroup(acc_detailLayout.createSequentialGroup()
                        .addGap(33, 33, 33)
                        .addComponent(jLabel15)
                        .addGap(35, 35, 35)
                        .addComponent(acc_de_s1, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(37, 37, 37)
                        .addComponent(jButton7, javax.swing.GroupLayout.DEFAULT_SIZE, 98, Short.MAX_VALUE)))
                .addGap(18, 18, 18))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, acc_detailLayout.createSequentialGroup()
                .addContainerGap(105, Short.MAX_VALUE)
                .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(102, 102, 102))
        );
        acc_detailLayout.setVerticalGroup(
            acc_detailLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(acc_detailLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addGroup(acc_detailLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton7)
                    .addComponent(jLabel15)
                    .addComponent(acc_de_s1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(22, Short.MAX_VALUE))
        );

        acc_mana.setTitle("Account manager");
        acc_mana.setBackground(new java.awt.Color(102, 102, 102));
        acc_mana.setForeground(java.awt.Color.white);

        jLabel24.setBackground(new java.awt.Color(102, 102, 102));
        jLabel24.setFont(new java.awt.Font("Tahoma", 0, 18));
        jLabel24.setForeground(new java.awt.Color(0, 51, 255));
        jLabel24.setText("Account Manager");

        jPanel5.setBackground(new java.awt.Color(204, 204, 204));
        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Search Account"));
        jPanel5.setForeground(new java.awt.Color(102, 102, 102));

        jLabel26.setText("Account ID");

        jButton9.setText("Search");
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(29, 29, 29)
                .addComponent(jLabel26)
                .addGap(18, 18, 18)
                .addComponent(acc_ma_s1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButton9, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(acc_ma_s1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton9))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel6.setBackground(new java.awt.Color(204, 204, 204));
        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Account detail"));
        jPanel6.setForeground(new java.awt.Color(102, 102, 102));

        jLabel27.setText("Account ID");

        jLabel28.setText("Account passwotf");

        jLabel29.setText("Note of account");

        jLabel30.setText("Account Type");

        acc_ma_t1.setBackground(new java.awt.Color(204, 204, 204));
        acc_ma_t1.setEditable(false);

        acc_ma_t2.setBackground(new java.awt.Color(204, 204, 204));

        acc_ma_t3.setBackground(new java.awt.Color(204, 204, 204));
        acc_ma_t3.setColumns(20);
        acc_ma_t3.setRows(5);
        jScrollPane4.setViewportView(acc_ma_t3);

        acc_ma_t4.setBackground(new java.awt.Color(204, 204, 204));
        acc_ma_t4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Root Admin", "Admin" }));

        acc_ma_b1.setText("Save edit");
        acc_ma_b1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                acc_ma_b1ActionPerformed(evt);
            }
        });

        acc_ma_b2.setText("Delete");
        acc_ma_b2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                acc_ma_b2ActionPerformed(evt);
            }
        });

        jButton11.setText("Exit");
        jButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton11ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel6Layout.createSequentialGroup()
                                .addComponent(jLabel27)
                                .addGap(53, 53, 53)
                                .addComponent(acc_ma_t1, javax.swing.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE))
                            .addGroup(jPanel6Layout.createSequentialGroup()
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel28)
                                    .addComponent(jLabel29))
                                .addGap(20, 20, 20)
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE)
                                    .addComponent(acc_ma_t2, javax.swing.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE)))
                            .addGroup(jPanel6Layout.createSequentialGroup()
                                .addComponent(jLabel30)
                                .addGap(40, 40, 40)
                                .addComponent(acc_ma_t4, 0, 166, Short.MAX_VALUE))))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGap(41, 41, 41)
                        .addComponent(acc_ma_b1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(acc_ma_b2, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton11, javax.swing.GroupLayout.DEFAULT_SIZE, 73, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel27)
                    .addComponent(acc_ma_t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel28)
                    .addComponent(acc_ma_t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel29)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
                        .addComponent(jLabel30)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(acc_ma_t4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addGap(18, 18, 18)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(acc_ma_b1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(acc_ma_b2, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        javax.swing.GroupLayout acc_manaLayout = new javax.swing.GroupLayout(acc_mana.getContentPane());
        acc_mana.getContentPane().setLayout(acc_manaLayout);
        acc_manaLayout.setHorizontalGroup(
            acc_manaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, acc_manaLayout.createSequentialGroup()
                .addGap(14, 14, 14)
                .addGroup(acc_manaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(acc_manaLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 84, Short.MAX_VALUE)
                        .addComponent(jLabel24)
                        .addGap(94, 94, 94))
                    .addGroup(acc_manaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        acc_manaLayout.setVerticalGroup(
            acc_manaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(acc_manaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel24)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(12, Short.MAX_VALUE))
        );

        edit_queofpuzzle.setTitle("Editing question of puzzle");

        jPanel18.setBackground(new java.awt.Color(102, 102, 102));

        jLabel52.setBackground(new java.awt.Color(102, 102, 102));
        jLabel52.setFont(new java.awt.Font("Times New Roman", 1, 18));
        jLabel52.setForeground(new java.awt.Color(0, 51, 255));
        jLabel52.setText("Edit questions of puzzle");

        jScrollPane25.setBackground(new java.awt.Color(204, 204, 204));

        edit_ques_ta.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        jScrollPane25.setViewportView(edit_ques_ta);

        jLabel53.setText("Puzzle");

        jLabel54.setText("Question");

        edit_ques_t1.setBackground(new java.awt.Color(204, 204, 204));
        jScrollPane26.setViewportView(edit_ques_t1);

        edit_ques_t2.setBackground(new java.awt.Color(204, 204, 204));
        edit_ques_t2.setEditable(false);
        jScrollPane27.setViewportView(edit_ques_t2);

        jLabel55.setText("Answer");

        jButton13.setText("Ok");
        jButton13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton13ActionPerformed(evt);
            }
        });

        jButton32.setText("Cancel");
        jButton32.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton32ActionPerformed(evt);
            }
        });

        edit_que_lab.setText("index");

        jLabel56.setText("Type");

        edit_que_lab2.setText("t");

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel18Layout.createSequentialGroup()
                                    .addComponent(jScrollPane25, javax.swing.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel18Layout.createSequentialGroup()
                                    .addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jButton32, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(21, 21, 21)))
                            .addGroup(jPanel18Layout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(jLabel53)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane27, javax.swing.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel18Layout.createSequentialGroup()
                                .addComponent(jLabel54)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)
                                .addComponent(edit_que_lab)
                                .addGap(31, 31, 31)
                                .addComponent(jLabel56)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(edit_que_lab2, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(14, 14, 14))
                            .addGroup(jPanel18Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel55))
                            .addComponent(jScrollPane26, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addGap(138, 138, 138)
                        .addComponent(jLabel52)))
                .addContainerGap())
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel52, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel53)
                    .addComponent(edit_que_lab)
                    .addComponent(edit_que_lab2)
                    .addComponent(jLabel56)
                    .addComponent(jLabel54))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addComponent(jScrollPane25, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton32, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE)
                            .addComponent(jButton13, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE)))
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addComponent(jScrollPane26, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel55)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane27, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)))
                .addGap(17, 17, 17))
        );

        javax.swing.GroupLayout edit_queofpuzzleLayout = new javax.swing.GroupLayout(edit_queofpuzzle.getContentPane());
        edit_queofpuzzle.getContentPane().setLayout(edit_queofpuzzleLayout);
        edit_queofpuzzleLayout.setHorizontalGroup(
            edit_queofpuzzleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        edit_queofpuzzleLayout.setVerticalGroup(
            edit_queofpuzzleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        jButton3.setText("jButton3");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Cross Word Puzzle Control Panel");
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel22.setBackground(new java.awt.Color(102, 102, 102));
        jPanel22.setBorder(javax.swing.BorderFactory.createTitledBorder("Tool Box"));

        jButton28.setText("New 4x4 Puzzle");
        jButton28.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton28ActionPerformed(evt);
            }
        });

        jButton30.setText("New 6x6 Puzzle");
        jButton30.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton30ActionPerformed(evt);
            }
        });

        jButton31.setText("Manager Puzzle");
        jButton31.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton31ActionPerformed(evt);
            }
        });

        acc_1.setText("Add Account");
        acc_1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                acc_1ActionPerformed(evt);
            }
        });

        acc_2.setText("Manager Account");
        acc_2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                acc_2ActionPerformed(evt);
            }
        });

        acc_3.setText("View Account");
        acc_3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                acc_3ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);
        jPanel22.setLayout(jPanel22Layout);
        jPanel22Layout.setHorizontalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel22Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButton28)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton30)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton31)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(acc_1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(acc_2, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(acc_3)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel22Layout.setVerticalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel22Layout.createSequentialGroup()
                .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(acc_2, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
                        .addComponent(acc_3, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE))
                    .addComponent(jButton28, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
                    .addComponent(jButton30, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
                    .addComponent(jButton31, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
                    .addComponent(acc_1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE))
                .addContainerGap())
        );

        getContentPane().add(jPanel22, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));

        main.setBackground(new java.awt.Color(102, 102, 102));

        jLabel50.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cross_word.jpg"))); // NOI18N

        jLabel82.setFont(new java.awt.Font("Tahoma", 1, 36));
        jLabel82.setForeground(new java.awt.Color(204, 0, 0));
        jLabel82.setText("Welcome to Cross Word Admin");

        main_lab.setFont(new java.awt.Font("Tahoma", 0, 14));
        main_lab.setText("You are Root Admin");

        javax.swing.GroupLayout mainLayout = new javax.swing.GroupLayout(main);
        main.setLayout(mainLayout);
        mainLayout.setHorizontalGroup(
            mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainLayout.createSequentialGroup()
                .addGroup(mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(mainLayout.createSequentialGroup()
                        .addGap(269, 269, 269)
                        .addComponent(main_lab, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(mainLayout.createSequentialGroup()
                        .addGap(145, 145, 145)
                        .addComponent(jLabel50))
                    .addGroup(mainLayout.createSequentialGroup()
                        .addGap(57, 57, 57)
                        .addComponent(jLabel82, javax.swing.GroupLayout.PREFERRED_SIZE, 568, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(65, Short.MAX_VALUE))
        );
        mainLayout.setVerticalGroup(
            mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainLayout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addComponent(jLabel82, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(main_lab)
                .addGap(45, 45, 45)
                .addComponent(jLabel50, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        getContentPane().add(main, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 90, 690, 400));

        puz_mama.setBackground(new java.awt.Color(102, 102, 102));

        edit_table.setBackground(new java.awt.Color(204, 204, 204));
        edit_table.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Puzzle ID", "Puzzle Name", "Create By", "Type"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        edit_table.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                edit_tableMouseClicked(evt);
            }
        });
        jScrollPane12.setViewportView(edit_table);

        jScrollPane12.setBounds(10, 70, 370, 320);
        puz_mama.add(jScrollPane12, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel81.setFont(new java.awt.Font("Tahoma", 1, 24));
        jLabel81.setForeground(new java.awt.Color(51, 51, 255));
        jLabel81.setText("Manager Puzzle");
        jLabel81.setBounds(60, 10, 200, 50);
        puz_mama.add(jLabel81, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel3.setBackground(new java.awt.Color(204, 204, 204));
        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder("Comand")));

        jButton29.setText("Exit");
        jButton29.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton29ActionPerformed(evt);
            }
        });

        jButton36.setText("Delete");
        jButton36.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton36ActionPerformed(evt);
            }
        });

        jButton37.setText("Edit");
        jButton37.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton37ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jButton37, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(10, 10, 10)
                .addComponent(jButton36)
                .addGap(7, 7, 7)
                .addComponent(jButton29, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton37, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton36, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton29, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(12, Short.MAX_VALUE))
        );

        jPanel3.setBounds(420, 50, 240, -1);
        puz_mama.add(jPanel3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel33.setText("Content");
        jLabel33.setBounds(390, 150, -1, -1);
        puz_mama.add(jLabel33, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jScrollPane1.setBackground(new java.awt.Color(102, 102, 102));

        edit_con.setBackground(new java.awt.Color(204, 204, 204));
        edit_con.setColumns(20);
        edit_con.setEditable(false);
        edit_con.setRows(5);
        jScrollPane1.setViewportView(edit_con);

        jScrollPane1.setBounds(400, 170, 280, 220);
        puz_mama.add(jScrollPane1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        getContentPane().add(puz_mama, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 90, 690, 400));

        edit_4.setBackground(new java.awt.Color(102, 102, 102));

        jPanel25.setBackground(new java.awt.Color(204, 204, 204));
        jPanel25.setBorder(javax.swing.BorderFactory.createTitledBorder("Puzzle Information"));

        jLabel83.setText("Puzzle ID");

        jLabel84.setText("Puzzle Name");

        jLabel86.setText("Puzzle Type");

        jLabel87.setText("Puzzle Of");

        ecom_4_t1.setText("NULL");

        ecom_4_t2.setText("NULL");

        ecom_4_t3.setText("4");

        ecom_4_t4.setText("NULL");

        javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25);
        jPanel25.setLayout(jPanel25Layout);
        jPanel25Layout.setHorizontalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel25Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel25Layout.createSequentialGroup()
                        .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel84)
                            .addComponent(jLabel83))
                        .addGap(76, 76, 76)
                        .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(ecom_4_t1)
                            .addComponent(ecom_4_t2)))
                    .addGroup(jPanel25Layout.createSequentialGroup()
                        .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel86)
                            .addComponent(jLabel87))
                        .addGap(76, 76, 76)
                        .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(ecom_4_t3, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ecom_4_t4))))
                .addContainerGap(77, Short.MAX_VALUE))
        );
        jPanel25Layout.setVerticalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel25Layout.createSequentialGroup()
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ecom_4_t1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel83))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel84)
                    .addComponent(ecom_4_t2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel86)
                    .addComponent(ecom_4_t3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel87)
                    .addComponent(ecom_4_t4))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel25.setBounds(20, 280, 280, 110);
        edit_4.add(jPanel25, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel93.setFont(new java.awt.Font("Tahoma", 1, 20));
        jLabel93.setForeground(new java.awt.Color(51, 51, 255));
        jLabel93.setText("Puzzle 4x4 Edit Center");
        jLabel93.setBounds(50, 20, 230, 40);
        edit_4.add(jLabel93, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel94.setText("List Quesstions");
        jLabel94.setBounds(330, 30, -1, -1);
        edit_4.add(jLabel94, javax.swing.JLayeredPane.DEFAULT_LAYER);

        ecom_4_i1.setBackground(new java.awt.Color(204, 204, 204));
        ecom_4_i1.setColumns(20);
        ecom_4_i1.setEditable(false);
        ecom_4_i1.setRows(5);
        jScrollPane15.setViewportView(ecom_4_i1);

        jScrollPane15.setBounds(330, 170, 340, -1);
        edit_4.add(jScrollPane15, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel95.setText("Answer of question bellow");
        jLabel95.setBounds(330, 154, -1, -1);
        edit_4.add(jLabel95, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel26.setBackground(new java.awt.Color(204, 204, 204));
        jPanel26.setBorder(javax.swing.BorderFactory.createTitledBorder("Editing Area"));

        jButton38.setText("Edit");
        jButton38.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton38ActionPerformed(evt);
            }
        });

        jButton39.setText("Delete");
        jButton39.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton39ActionPerformed(evt);
            }
        });

        jButton40.setText("Back");
        jButton40.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton40ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26);
        jPanel26.setLayout(jPanel26Layout);
        jPanel26Layout.setHorizontalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel26Layout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addComponent(jButton38, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(28, 28, 28)
                .addComponent(jButton39, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton40, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(24, Short.MAX_VALUE))
        );
        jPanel26Layout.setVerticalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel26Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton38, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton39, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton40, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(29, Short.MAX_VALUE))
        );

        jPanel26.setBounds(330, 280, 340, 110);
        edit_4.add(jPanel26, javax.swing.JLayeredPane.DEFAULT_LAYER);

        edit_table_list.setBackground(new java.awt.Color(204, 204, 204));
        edit_table_list.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        edit_table_list.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                edit_table_listValueChanged(evt);
            }
        });
        jScrollPane14.setViewportView(edit_table_list);

        jScrollPane13.setViewportView(jScrollPane14);

        jScrollPane13.setBounds(330, 50, 340, 100);
        edit_4.add(jScrollPane13, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jScrollPane16.setBackground(new java.awt.Color(204, 204, 204));

        edit_4_4.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        jScrollPane16.setViewportView(edit_4_4);

        jScrollPane16.setBounds(50, 70, 250, 200);
        edit_4.add(jScrollPane16, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel9.setBackground(new java.awt.Color(204, 204, 204));

        jLabel34.setText("2");

        jLabel35.setText("1");

        jLabel36.setText("3");

        jLabel37.setText("4");

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel37, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel35, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel36, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel34, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(jLabel35)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE)
                .addComponent(jLabel34)
                .addGap(30, 30, 30)
                .addComponent(jLabel36)
                .addGap(37, 37, 37)
                .addComponent(jLabel37)
                .addGap(21, 21, 21))
        );

        jPanel9.setBounds(20, 70, 30, 200);
        edit_4.add(jPanel9, javax.swing.JLayeredPane.DEFAULT_LAYER);

        getContentPane().add(edit_4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 90, 690, 400));

        edit_6.setBackground(new java.awt.Color(102, 102, 102));

        jPanel27.setBackground(new java.awt.Color(204, 204, 204));
        jPanel27.setBorder(javax.swing.BorderFactory.createTitledBorder("Puzzle Information"));

        jLabel97.setText("Puzzle ID");

        jLabel98.setText("Puzzle Name");

        jLabel100.setText("Puzzle Type");

        jLabel101.setText("Puzzle Of");

        ecom_6_t1.setText("NULL");

        ecom_6_t2.setText("NULL");

        ecom_6_t3.setText("6");

        ecom_6_t4.setText("NULL");

        javax.swing.GroupLayout jPanel27Layout = new javax.swing.GroupLayout(jPanel27);
        jPanel27.setLayout(jPanel27Layout);
        jPanel27Layout.setHorizontalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel27Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel27Layout.createSequentialGroup()
                        .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel97)
                            .addComponent(jLabel98))
                        .addGap(76, 76, 76)
                        .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(ecom_6_t2)
                            .addComponent(ecom_6_t1)))
                    .addGroup(jPanel27Layout.createSequentialGroup()
                        .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel100)
                            .addComponent(jLabel101))
                        .addGap(76, 76, 76)
                        .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(ecom_6_t3, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ecom_6_t4))))
                .addContainerGap(82, Short.MAX_VALUE))
        );
        jPanel27Layout.setVerticalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel27Layout.createSequentialGroup()
                .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel97)
                    .addComponent(ecom_6_t1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel98)
                    .addComponent(ecom_6_t2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel100)
                    .addComponent(ecom_6_t3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel101)
                    .addComponent(ecom_6_t4))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel27.setBounds(10, 280, 290, 110);
        edit_6.add(jPanel27, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel107.setFont(new java.awt.Font("Tahoma", 1, 20));
        jLabel107.setForeground(new java.awt.Color(0, 51, 255));
        jLabel107.setText("Puzzle 6x6 Edit Center");
        jLabel107.setBounds(40, 30, 230, 40);
        edit_6.add(jLabel107, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel108.setText("List Quesstions");
        jLabel108.setBounds(340, 30, -1, 20);
        edit_6.add(jLabel108, javax.swing.JLayeredPane.DEFAULT_LAYER);

        ecom_6_i1.setBackground(new java.awt.Color(204, 204, 204));
        ecom_6_i1.setColumns(20);
        ecom_6_i1.setEditable(false);
        ecom_6_i1.setRows(5);
        jScrollPane17.setViewportView(ecom_6_i1);

        jScrollPane17.setBounds(330, 170, 340, -1);
        edit_6.add(jScrollPane17, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel109.setText("Answer of question bellow");
        jLabel109.setBounds(326, 150, 140, 20);
        edit_6.add(jLabel109, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel28.setBackground(new java.awt.Color(204, 204, 204));
        jPanel28.setBorder(javax.swing.BorderFactory.createTitledBorder("Editing Area"));

        jButton41.setText("Edit");
        jButton41.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton41ActionPerformed(evt);
            }
        });

        jButton42.setText("Delete");
        jButton42.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton42ActionPerformed(evt);
            }
        });

        jButton43.setText("Back");
        jButton43.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton43ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel28Layout = new javax.swing.GroupLayout(jPanel28);
        jPanel28.setLayout(jPanel28Layout);
        jPanel28Layout.setHorizontalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel28Layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addComponent(jButton41, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(26, 26, 26)
                .addComponent(jButton42, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton43, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(18, Short.MAX_VALUE))
        );
        jPanel28Layout.setVerticalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel28Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton41, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton42, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton43, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(29, Short.MAX_VALUE))
        );

        jPanel28.setBounds(330, 280, 330, 110);
        edit_6.add(jPanel28, javax.swing.JLayeredPane.DEFAULT_LAYER);

        edit_table_list6.setBackground(new java.awt.Color(204, 204, 204));
        edit_table_list6.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        edit_table_list6.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                edit_table_list6ValueChanged(evt);
            }
        });
        jScrollPane19.setViewportView(edit_table_list6);

        jScrollPane18.setViewportView(jScrollPane19);

        jScrollPane18.setBounds(330, 50, 340, 100);
        edit_6.add(jScrollPane18, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jScrollPane20.setBackground(new java.awt.Color(204, 204, 204));

        edit_6_6.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        jScrollPane20.setViewportView(edit_6_6);

        jScrollPane20.setBounds(40, 80, 260, 190);
        edit_6.add(jScrollPane20, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel10.setBackground(new java.awt.Color(204, 204, 204));

        jLabel38.setText("2");

        jLabel39.setText("1");

        jLabel40.setText("3");

        jLabel41.setText("4");

        jLabel42.setText("5");

        jLabel43.setText("6");

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel39, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel38, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel40, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel43, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel42, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel41, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel39)
                .addGap(18, 18, 18)
                .addComponent(jLabel38)
                .addGap(18, 18, 18)
                .addComponent(jLabel40)
                .addGap(18, 18, 18)
                .addComponent(jLabel41)
                .addGap(12, 12, 12)
                .addComponent(jLabel42)
                .addGap(18, 18, 18)
                .addComponent(jLabel43)
                .addContainerGap())
        );

        jPanel10.setBounds(10, 80, 30, 190);
        edit_6.add(jPanel10, javax.swing.JLayeredPane.DEFAULT_LAYER);

        getContentPane().add(edit_6, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 90, 690, 400));

        new4.setBackground(new java.awt.Color(153, 153, 255));

        jPanel29.setBackground(new java.awt.Color(102, 102, 102));
        jPanel29.setBorder(javax.swing.BorderFactory.createTitledBorder("Puzzle Information"));

        jLabel110.setText("Admin");

        jLabel111.setText("Puzzle Name");

        jLabel113.setText("Puzzle Type");

        new4_la1.setText("NULL");

        new4_la2.setText("NULL");

        jLabel117.setText("4");

        javax.swing.GroupLayout jPanel29Layout = new javax.swing.GroupLayout(jPanel29);
        jPanel29.setLayout(jPanel29Layout);
        jPanel29Layout.setHorizontalGroup(
            jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel29Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel113)
                    .addComponent(jLabel111)
                    .addComponent(jLabel110))
                .addGap(53, 53, 53)
                .addGroup(jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel117, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(new4_la1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(new4_la2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap(91, Short.MAX_VALUE))
        );
        jPanel29Layout.setVerticalGroup(
            jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel29Layout.createSequentialGroup()
                .addGroup(jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel29Layout.createSequentialGroup()
                        .addComponent(new4_la1, javax.swing.GroupLayout.DEFAULT_SIZE, 27, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(new4_la2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel117))
                    .addGroup(jPanel29Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel110)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel111, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel113)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel29.setBounds(20, 30, 270, 100);
        new4.add(jPanel29, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel118.setFont(new java.awt.Font("Tahoma", 1, 20));
        jLabel118.setForeground(new java.awt.Color(51, 51, 255));
        jLabel118.setText("Create new Puzzle");
        jLabel118.setBounds(210, 0, 190, 30);
        new4.add(jLabel118, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jScrollPane21.setBackground(new java.awt.Color(102, 102, 102));

        ta_4_4.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        jScrollPane21.setViewportView(ta_4_4);

        jScrollPane21.setBounds(50, 130, 240, 210);
        new4.add(jScrollPane21, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jButton44.setBackground(new java.awt.Color(213, 231, 241));
        jButton44.setText("View");
        jButton44.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton44ActionPerformed(evt);
            }
        });
        jButton44.setBounds(50, 350, 90, 40);
        new4.add(jButton44, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jButton45.setBackground(new java.awt.Color(213, 231, 241));
        jButton45.setText("Design");
        jButton45.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton45ActionPerformed(evt);
            }
        });
        jButton45.setBounds(180, 350, 90, 40);
        new4.add(jButton45, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel30.setBackground(new java.awt.Color(102, 102, 102));
        jPanel30.setBorder(javax.swing.BorderFactory.createTitledBorder("Quesstion Area"));

        jLabel119.setText("Question");

        new4_t1.setBackground(new java.awt.Color(204, 204, 204));
        new4_t1.setColumns(20);
        new4_t1.setRows(5);
        jScrollPane22.setViewportView(new4_t1);

        jLabel120.setText("Answer");

        new4_t2.setBackground(new java.awt.Color(204, 204, 204));
        new4_t2.setEditable(false);

        jPanel31.setBackground(new java.awt.Color(204, 204, 204));
        jPanel31.setBorder(javax.swing.BorderFactory.createTitledBorder("Question Dectrition"));

        new4_a.setBackground(new java.awt.Color(102, 102, 102));
        bg_new4.add(new4_a);
        new4_a.setSelected(true);
        new4_a.setText("Vertically");

        new4_b.setBackground(new java.awt.Color(102, 102, 102));
        bg_new4.add(new4_b);
        new4_b.setText("Horizontal");

        javax.swing.GroupLayout jPanel31Layout = new javax.swing.GroupLayout(jPanel31);
        jPanel31.setLayout(jPanel31Layout);
        jPanel31Layout.setHorizontalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel31Layout.createSequentialGroup()
                .addGap(69, 69, 69)
                .addComponent(new4_a)
                .addGap(53, 53, 53)
                .addComponent(new4_b)
                .addContainerGap(72, Short.MAX_VALUE))
        );
        jPanel31Layout.setVerticalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(new4_b, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(new4_a, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        save4_que.setBackground(new java.awt.Color(213, 231, 241));
        save4_que.setText("Save Quesstion");
        save4_que.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                save4_queActionPerformed(evt);
            }
        });

        jButton47.setBackground(new java.awt.Color(213, 231, 241));
        jButton47.setText("Reset Quesstion");
        jButton47.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton47ActionPerformed(evt);
            }
        });

        posi.setText("1");

        javax.swing.GroupLayout jPanel30Layout = new javax.swing.GroupLayout(jPanel30);
        jPanel30.setLayout(jPanel30Layout);
        jPanel30Layout.setHorizontalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel30Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel119)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(posi, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(253, Short.MAX_VALUE))
            .addComponent(new4_t2, javax.swing.GroupLayout.DEFAULT_SIZE, 348, Short.MAX_VALUE)
            .addComponent(jPanel31, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel30Layout.createSequentialGroup()
                .addGap(41, 41, 41)
                .addComponent(save4_que)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 51, Short.MAX_VALUE)
                .addComponent(jButton47)
                .addGap(38, 38, 38))
            .addComponent(jScrollPane22, javax.swing.GroupLayout.DEFAULT_SIZE, 348, Short.MAX_VALUE)
            .addGroup(jPanel30Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel120)
                .addContainerGap(302, Short.MAX_VALUE))
        );
        jPanel30Layout.setVerticalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel30Layout.createSequentialGroup()
                .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel119)
                    .addComponent(posi))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane22, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel120, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(new4_t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton47, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(save4_que, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jPanel30.setBounds(310, 30, 360, 290);
        new4.add(jPanel30, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel32.setBackground(new java.awt.Color(102, 102, 102));
        jPanel32.setBorder(javax.swing.BorderFactory.createTitledBorder("Comand"));

        jButton48.setBackground(new java.awt.Color(213, 231, 241));
        jButton48.setText("Save Puzzle");
        jButton48.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton48ActionPerformed(evt);
            }
        });

        jButton49.setBackground(new java.awt.Color(213, 231, 241));
        jButton49.setText("Exit Puzzle");
        jButton49.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton49ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel32Layout = new javax.swing.GroupLayout(jPanel32);
        jPanel32.setLayout(jPanel32Layout);
        jPanel32Layout.setHorizontalGroup(
            jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel32Layout.createSequentialGroup()
                .addGap(46, 46, 46)
                .addComponent(jButton48, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 55, Short.MAX_VALUE)
                .addComponent(jButton49, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(46, 46, 46))
        );
        jPanel32Layout.setVerticalGroup(
            jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel32Layout.createSequentialGroup()
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton49)
                    .addComponent(jButton48, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(20, Short.MAX_VALUE))
        );

        jPanel32.setBounds(310, 320, -1, 70);
        new4.add(jPanel32, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel7.setBackground(new java.awt.Color(102, 102, 102));

        jLabel1.setText("2");

        jLabel7.setText("1");

        jLabel9.setText("3");

        jLabel18.setText("4");

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel18, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap(41, Short.MAX_VALUE)
                .addComponent(jLabel7)
                .addGap(27, 27, 27)
                .addComponent(jLabel1)
                .addGap(29, 29, 29)
                .addComponent(jLabel9)
                .addGap(32, 32, 32)
                .addComponent(jLabel18)
                .addGap(25, 25, 25))
        );

        jPanel7.setBounds(20, 130, 30, 210);
        new4.add(jPanel7, javax.swing.JLayeredPane.DEFAULT_LAYER);

        getContentPane().add(new4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 90, 690, 400));

        new6.setBackground(new java.awt.Color(102, 102, 102));

        jLabel129.setFont(new java.awt.Font("Tahoma", 1, 20));
        jLabel129.setForeground(new java.awt.Color(51, 51, 255));
        jLabel129.setText("Create new Puzzle");
        jLabel129.setBounds(210, 0, 190, 30);
        new6.add(jLabel129, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jScrollPane23.setBackground(new java.awt.Color(102, 102, 102));

        ta_6_6.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        jScrollPane23.setViewportView(ta_6_6);

        jScrollPane23.setBounds(50, 130, 240, 210);
        new6.add(jScrollPane23, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jButton50.setBackground(new java.awt.Color(213, 231, 241));
        jButton50.setText("View");
        jButton50.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton50ActionPerformed(evt);
            }
        });
        jButton50.setBounds(40, 350, 100, 40);
        new6.add(jButton50, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jButton51.setBackground(new java.awt.Color(213, 231, 241));
        jButton51.setText("Design");
        jButton51.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton51ActionPerformed(evt);
            }
        });
        jButton51.setBounds(170, 350, 100, 40);
        new6.add(jButton51, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel34.setBackground(new java.awt.Color(102, 102, 102));
        jPanel34.setBorder(javax.swing.BorderFactory.createTitledBorder("Quesstion Area"));

        jLabel130.setText("Question");

        new6_t1.setBackground(new java.awt.Color(204, 204, 204));
        new6_t1.setColumns(20);
        new6_t1.setRows(5);
        jScrollPane24.setViewportView(new6_t1);

        jLabel131.setText("Answer");

        new6_t2.setBackground(new java.awt.Color(204, 204, 204));
        new6_t2.setEditable(false);

        jPanel35.setBackground(new java.awt.Color(204, 204, 204));
        jPanel35.setBorder(javax.swing.BorderFactory.createTitledBorder("Question Dectrition"));

        new6_a.setBackground(new java.awt.Color(102, 102, 102));
        bg_new6.add(new6_a);
        new6_a.setSelected(true);
        new6_a.setText("Vertically");

        new6_b.setBackground(new java.awt.Color(102, 102, 102));
        bg_new6.add(new6_b);
        new6_b.setText("Horizontal");

        javax.swing.GroupLayout jPanel35Layout = new javax.swing.GroupLayout(jPanel35);
        jPanel35.setLayout(jPanel35Layout);
        jPanel35Layout.setHorizontalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel35Layout.createSequentialGroup()
                .addGap(76, 76, 76)
                .addComponent(new6_a)
                .addGap(41, 41, 41)
                .addComponent(new6_b)
                .addContainerGap(77, Short.MAX_VALUE))
        );
        jPanel35Layout.setVerticalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(new6_b)
                .addComponent(new6_a))
        );

        save6_que.setBackground(new java.awt.Color(213, 231, 241));
        save6_que.setText("Save Quesstion");
        save6_que.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                save6_queActionPerformed(evt);
            }
        });

        jButton53.setBackground(new java.awt.Color(213, 231, 241));
        jButton53.setText("Reset Quesstion");
        jButton53.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton53ActionPerformed(evt);
            }
        });

        posi_2.setText("1");

        javax.swing.GroupLayout jPanel34Layout = new javax.swing.GroupLayout(jPanel34);
        jPanel34.setLayout(jPanel34Layout);
        jPanel34Layout.setHorizontalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel34Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel130)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(posi_2, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(243, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel34Layout.createSequentialGroup()
                .addContainerGap(45, Short.MAX_VALUE)
                .addComponent(save6_que)
                .addGap(40, 40, 40)
                .addComponent(jButton53)
                .addGap(45, 45, 45))
            .addComponent(jPanel35, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jPanel34Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel131)
                .addContainerGap(302, Short.MAX_VALUE))
            .addComponent(new6_t2, javax.swing.GroupLayout.DEFAULT_SIZE, 348, Short.MAX_VALUE)
            .addComponent(jScrollPane24, javax.swing.GroupLayout.DEFAULT_SIZE, 348, Short.MAX_VALUE)
        );
        jPanel34Layout.setVerticalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel34Layout.createSequentialGroup()
                .addGroup(jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel130)
                    .addComponent(posi_2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane24, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel131, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(new6_t2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(save6_que, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton53, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jPanel34.setBounds(310, 40, 360, 290);
        new6.add(jPanel34, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel36.setBackground(new java.awt.Color(102, 102, 102));
        jPanel36.setBorder(javax.swing.BorderFactory.createTitledBorder("Comand"));

        jButton54.setBackground(new java.awt.Color(213, 231, 241));
        jButton54.setText("Save Puzzle");
        jButton54.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton54ActionPerformed(evt);
            }
        });

        jButton55.setBackground(new java.awt.Color(213, 231, 241));
        jButton55.setText("Exit Puzzle");
        jButton55.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton55ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel36Layout = new javax.swing.GroupLayout(jPanel36);
        jPanel36.setLayout(jPanel36Layout);
        jPanel36Layout.setHorizontalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel36Layout.createSequentialGroup()
                .addContainerGap(55, Short.MAX_VALUE)
                .addComponent(jButton54, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(38, 38, 38)
                .addComponent(jButton55, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(54, 54, 54))
        );
        jPanel36Layout.setVerticalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel36Layout.createSequentialGroup()
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton55, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton54, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        jPanel36.setBounds(310, 330, -1, 60);
        new6.add(jPanel36, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel8.setBackground(new java.awt.Color(102, 102, 102));

        jLabel21.setText("2");

        jLabel22.setBackground(new java.awt.Color(102, 102, 102));
        jLabel22.setText("1");

        jLabel23.setText("3");

        jLabel25.setText("4");

        jLabel31.setText("5");

        jLabel32.setText("6");

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel23, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel25, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel31, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel32, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel22, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE)
                    .addComponent(jLabel21, javax.swing.GroupLayout.DEFAULT_SIZE, 10, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(32, Short.MAX_VALUE)
                .addComponent(jLabel22)
                .addGap(18, 18, 18)
                .addComponent(jLabel21)
                .addGap(18, 18, 18)
                .addComponent(jLabel23)
                .addGap(18, 18, 18)
                .addComponent(jLabel25)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel31, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel32)
                .addContainerGap())
        );

        jPanel8.setBounds(20, 130, 30, 210);
        new6.add(jPanel8, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel33.setBackground(new java.awt.Color(102, 102, 102));
        jPanel33.setBorder(javax.swing.BorderFactory.createTitledBorder("Puzzle Information"));

        jLabel112.setText("Admin");

        jLabel114.setText("Puzzle Name");

        jLabel115.setText("Puzzle Type");

        new6_la1.setText("NULL");

        new6_la2.setText("NULL");

        jLabel121.setText("6");

        javax.swing.GroupLayout jPanel33Layout = new javax.swing.GroupLayout(jPanel33);
        jPanel33.setLayout(jPanel33Layout);
        jPanel33Layout.setHorizontalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel33Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel115)
                    .addComponent(jLabel112)
                    .addComponent(jLabel114))
                .addGap(53, 53, 53)
                .addGroup(jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(new6_la2)
                    .addComponent(new6_la1)
                    .addComponent(jLabel121, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(86, Short.MAX_VALUE))
        );
        jPanel33Layout.setVerticalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel33Layout.createSequentialGroup()
                .addGroup(jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel33Layout.createSequentialGroup()
                        .addComponent(new6_la1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(new6_la2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel121))
                    .addGroup(jPanel33Layout.createSequentialGroup()
                        .addComponent(jLabel112)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel114)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel115)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel33.setBounds(20, 40, 270, 90);
        new6.add(jPanel33, javax.swing.JLayeredPane.DEFAULT_LAYER);

        getContentPane().add(new6, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 90, 690, 400));

        pack();
    }// </editor-fold>//GEN-END:initComponents
        //method sorts answers-array
    public Object[] sort_puzzle(Object[] not_sort)
     {
        Object[] ke=new Object[not_sort.length];
        Integer[] temp=new Integer[not_sort.length];
        //get id for temp
        for (int i = 0; i < temp.length; i++) {
             String[] te=not_sort[i].toString().split("-");
             temp[i]=new Integer(te[0]);
         }
        Arrays.sort(temp);
        // asign order
        for (int j = 0; j < ke.length; j++) {
            //String cell="";
            for (int m = 0; m < not_sort.length; m++) {
                String[] not=not_sort[m].toString().split("-");
                Integer in=new Integer(not[0]);
                if(temp[j].equals(in))
                {
                    ke[j]=not_sort[m].toString();
                    break;
                }
            }

         }
        return ke;
     }
    //Installation auto answer of question ....
    public void set_answer(int type)
     {
         if(type==4)
         {
         String ans="";
         //test
         Object[] tam=temp_puzzle.toArray();
         Object[] check=sort_puzzle(tam);
         Integer tep=0;
         for (int i = 0; i < check.length; i++) {
             String[] temp=check[i].toString().split("-");
             //Add text box to answer intersection
             if(new Integer(temp[0])-tep==2)
             {
                int[] tempo1=Pro.convert.number_to_table(tep+1, 4);
                String tempo2=ta_4_4.getValueAt(tempo1[0], tempo1[1]).toString();
                ans=ans+tempo2;
             }else if(new Integer(temp[0])-tep==8)
             {
                 int[] tempo1=Pro.convert.number_to_table(tep+4, 4);
                String tempo2=ta_4_4.getValueAt(tempo1[0], tempo1[1]).toString();
                ans=ans+tempo2;
             }
                          tep=new Integer(temp[0]);
             ans=ans+temp[1];
         }
         this.new4_t2.setText(ans);
         }else
         {
            String ans="";
         Object[] tam=temp_puzzle.toArray();
         Object[] check=sort_puzzle(tam);
         Integer tep=0;
         for (int i = 0; i < check.length; i++) {
             String[] temp=check[i].toString().split("-");
              //Add text box to answer intersection
             if(new Integer(temp[0])-tep==2)
             {
                int[] tempo1=Pro.convert.number_to_table(tep+1, 6);
                String tempo2=ta_6_6.getValueAt(tempo1[0], tempo1[1]).toString();
                ans=ans+tempo2;
             }else if(new Integer(temp[0])-tep==12)
             {
                 int[] tempo1=Pro.convert.number_to_table(tep+6, 6);
                String tempo2=ta_6_6.getValueAt(tempo1[0], tempo1[1]).toString();
                ans=ans+tempo2;
             }
             tep=new Integer(temp[0]);
             ans=ans+temp[1];
         }
         this.new6_t2.setText(ans);
         }
     }
    //Ham nay dung de dua cai vi tri cua tung o trong questions in array,
    //neu vi tri do chua co thi set, neu co roi, thi se remove va them vao
        public void temp_puzzle(int index, String content)
    {
        boolean tontai=false;
        for (Object ob : temp_puzzle) {
            String[] temp=ob.toString().split("-");
            String tam=index+"";
            if(tam.equals(temp[0]))
            {
                tontai=true;
            }
        }
        if(tontai==false)
        {
            temp_puzzle.add(index+"-"+content);
        }
        else
        {
             for (int i = 0; i < temp_puzzle.size(); i++) {
 {
            String[] temp=temp_puzzle.get(i).toString().split("-");
            String tam=index+"";
            if(tam.equals(temp[0]))
            {
                Integer ex=new Integer(temp[0]);
                for (int l = 0; l < temp_puzzle.size(); l++) {
                    String[] ch=temp_puzzle.get(l).toString().split("-");
                    Integer abc=new Integer(ch[0]);
                    if(ex.equals(abc))
                    {
                        temp_puzzle.remove(l);
                    }
                }
                temp_puzzle.add(index+"-"+content);
            }
        }
        }
    }
    }
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        String id=this.log_t1.getText();
        String pass=this.log_t2.getText();
        String type=this.log_t3.getSelectedItem().toString();
        if(id.equals(""))
        {
            JOptionPane.showMessageDialog(login, "Username not emply");
        }else if(pass.equals(""))
        {
            JOptionPane.showMessageDialog(login, "Password not emply");
        }else
        {
            //Kiem tra dang nhap ok
            boolean isvali=Database.account.vali_login(id, pass, type);
            if(isvali==true)
            {
                 JOptionPane.showMessageDialog(login, "Login correct, Wellcome to admin control");
             this.login.setVisible(false);
        this.setLocationRelativeTo(null);
        this.setVisible(true);
        //Add change permisson Root admin va admin, admin no edit account
            acctype=this.log_t3.getSelectedItem().toString();
            if(acctype.equals("Admin"))
            {
                this.acc_1.setEnabled(false);
                 this.acc_2.setEnabled(false);
                  this.acc_3.setEnabled(false);
            }
            this.main_lab.setText("You are "+acctype);
            this.new6_la1.setText(this.log_t1.getText());
            this.new4_la1.setText(this.log_t1.getText());
            }else
            {
                JOptionPane.showMessageDialog(login, "Login incorrect !");
                this.log_t1.setText("");
                this.log_t2.setText("");
                this.log_t3.setSelectedIndex(0);
            }
        }

    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton30ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton30ActionPerformed
        // TODO add your handling code here:
         this.temp_ques.clear();
        this.temp_puzzle.clear();
        for (int i = 0; i < 6; i++) {
            for (int j = 0; j < 6; j++) {
               con6[i][j]="";
            }
        }
         String puname=JOptionPane.showInputDialog("Input name of puzzle");
        this.new6_la2.setText(puname);
        ta_6_6.setModel(new DefaultTableModel(con6, head6));
        //Format for tab 6x6
        model_table(ta_6_6);
          this.set_show_jlayer(new6);
}//GEN-LAST:event_jButton30ActionPerformed

    private void jButton28ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton28ActionPerformed
        // TODO add your handling code here:
        this.temp_ques.clear();
        this.temp_puzzle.clear();
        for (int i = 0; i < 4; i++) {
            for (int j = 0; j < 4; j++) {
               con4[i][j]="";
            }
        }
        String puname=JOptionPane.showInputDialog("Input name of puzzle");
        this.new4_la2.setText(puname);
        ta_4_4.setModel(new DefaultTableModel(con4, head4));
        this.model_table_4(ta_4_4);
        this.set_show_jlayer(new4);
}//GEN-LAST:event_jButton28ActionPerformed

    private void acc_1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acc_1ActionPerformed
        // TODO add your handling code here:
         this.acc_add.setSize(340, 290);
        this.acc_add.setLocationRelativeTo(null);
        this.acc_add.setAlwaysOnTop(true);
        this.acc_add.setVisible(true);
    }//GEN-LAST:event_acc_1ActionPerformed

    private void acc_2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acc_2ActionPerformed
        // TODO add your handling code here:
         this.acc_ma_s1.removeAllItems();
        ArrayList list=Database.account.getaccid();
        for (Object object : list) {
            acc_ma_s1.addItem(object);
        }
        this.seten_acc_mana(false);
        this.acc_mana.setSize(340, 390);
        this.acc_mana.setLocationRelativeTo(null);
        this.acc_mana.setAlwaysOnTop(true);
        this.acc_mana.setVisible(true);
    }//GEN-LAST:event_acc_2ActionPerformed

    private void acc_3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acc_3ActionPerformed
        // TODO add your handling code here:
        this.acc_de_s1.removeAllItems();
        ArrayList list=Database.account.getaccid();
        for (Object object : list) {
            acc_de_s1.addItem(object);
        }
        this.acc_detail.setSize(390, 350);
        this.acc_detail.setLocationRelativeTo(null);
        this.acc_detail.setAlwaysOnTop(true);
        this.acc_detail.setVisible(true);
    }//GEN-LAST:event_acc_3ActionPerformed

    private void jButton29ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton29ActionPerformed
        // TODO add your handling code here:
       this.set_show_main();
    }//GEN-LAST:event_jButton29ActionPerformed

    private void jButton37ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton37ActionPerformed
        // TODO add your handling code here:
           int choss=this.edit_table.getSelectedRow();
       if(choss==-1)
       {
        JOptionPane.showMessageDialog(null, "You not choose any puzzle to be edit !","Error",JOptionPane.ERROR_MESSAGE);
       }else if(this.edit_table.getValueAt(choss, 0).toString().equals(""))
       {
        JOptionPane.showMessageDialog(null, "Have not any value for edit !","Error",JOptionPane.ERROR_MESSAGE);
       }else
       {
           String id=this.edit_table.getValueAt(choss, 0).toString();
           String name=this.edit_table.getValueAt(choss, 1).toString();
           String our=this.edit_table.getValueAt(choss, 2).toString();
           String type=this.edit_table.getValueAt(choss, 3).toString();
           if(type.equals("4"))
           {
           this.set_show_jlayer(edit_4);
           this.ecom_4_t1.setText(id);
           this.ecom_4_t2.setText(name);
           this.ecom_4_t3.setText(type);
           this.ecom_4_t4.setText(our);
           ecom_4_i1.setText("Please select question for more detail !");
           con4=Database.edit_puzzle_4.getcellcontent(new Integer(id));
           //Set edit non for all cell
             canEdit4 = new boolean[head4.length][head4.length];
           for (int i = 0; i < head4.length; i++) {
                   for (int j = 0; j < head4.length; j++) {
                    canEdit4[i][j]=false;
               }
               }
           DefaultTableModel model = new DefaultTableModel(con4, head4) {
                    @Override
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit4[rowIndex][columnIndex];
                }
            };
           edit_4_4.setModel(model);
           model_edit_4(edit_4_4);
           temp_ques=Database.edit_puzzle_4.get_temp_ques(new Integer(id));
           edit_table_list.setListData(Database.edit_puzzle_4.getlistdata(new Integer(id)).toArray());
           //
           }else
           {
                 this.set_show_jlayer(edit_6);
           this.ecom_6_t1.setText(id);
           this.ecom_6_t2.setText(name);
           this.ecom_6_t3.setText(type);
           this.ecom_6_t4.setText(our);
           ecom_6_i1.setText("Please select question for more detail !");
           con6=Database.edit_puzzle_6.getcellcontent(new Integer(id));
           //Set edit non for all cell
             canEdit = new boolean[head6.length][head6.length];
           for (int i = 0; i < head6.length; i++) {
                   for (int j = 0; j < head6.length; j++) {
                    canEdit[i][j]=false;
               }
               }
           DefaultTableModel model = new DefaultTableModel(con6, head6) {
                    @Override
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit[rowIndex][columnIndex];
                }
            };
           edit_6_6.setModel(model);
           model_edit_6(edit_6_6);
           temp_ques=Database.edit_puzzle_6.get_temp_ques(new Integer(id));
           edit_table_list6.setListData(Database.edit_puzzle_6.getlistdata(new Integer(id)).toArray());
           //
           }
       }
    }//GEN-LAST:event_jButton37ActionPerformed
    //Setup default table edit
    public void model_edit_4(JTable ta)
    {
       ta.setRowHeight(45);
       Font po=new Font("Time New Roman", Font.ITALIC, 30);
       ta.setFont(po);
       ta.setBackground(new Color(204, 255, 204));
       ta.setForeground(Color.LIGHT_GRAY);
       ta.setCellSelectionEnabled(true);
    }
     public void model_edit_6(JTable ta)
    {
    ta.setRowHeight(30);
       Font po=new Font("Time New Roman", Font.ITALIC, 30);
       ta.setFont(po);
       ta.setBackground(new Color(204, 255, 204));
       ta.setForeground(Color.LIGHT_GRAY);
       ta.setCellSelectionEnabled(true);
    }
    //Format table  4x4, can't input 2 character in cell or row
    public void model_table_4(JTable tab)
    {
       tab.setRowHeight(45);
       Font po=new Font("Time New Roman", Font.ITALIC, 30);
       tab.setFont(po);
       tab.setBackground(new Color(213, 231, 241));
       tab.setForeground(Color.LIGHT_GRAY);
       tab.setCellSelectionEnabled(true);
                 tab.getModel().addTableModelListener(new TableModelListener() {

                @Override
                public void tableChanged(TableModelEvent e) {
                    //Event change in table
                    int row=e.getFirstRow();
                    int col=e.getColumn();
                    String kq=ta_4_4.getValueAt(row, col).toString();
                    if(kq.length()>1)
                    {
                        JOptionPane.showMessageDialog(null, "You must input only one character !","Error",JOptionPane.ERROR_MESSAGE);
                        ta_4_4.setValueAt("", row, col);
                    }else
                    {
                       temp_puzzle(Pro.convert.table_to_number(row, col, 4),kq);
                       set_answer(4);
                    }
                }
            });
  }
    //Format table  6x6, can't input 2 character in cell or row
 public void model_table(JTable tab)
    {
       tab.setRowHeight(30);
       Font po=new Font("Time New Roman", Font.ITALIC, 30);
       tab.setFont(po);
       tab.setBackground(new Color(213, 231, 241));
       tab.setForeground(Color.LIGHT_GRAY);
       tab.setCellSelectionEnabled(true);
                 tab.getModel().addTableModelListener(new TableModelListener() {

                @Override
                public void tableChanged(TableModelEvent e) {
                    //Event change in table
                    int row=e.getFirstRow();
                    int col=e.getColumn();
                    String kq=ta_6_6.getValueAt(row, col).toString();
                    if(kq.length()==0)
                    {}else
                    if(kq.length()>1)
                    {
                        JOptionPane.showMessageDialog(null, "You must input only one character !","Error",JOptionPane.ERROR_MESSAGE);
                        ta_6_6.setValueAt("", row, col);
                    }else
                    {
                         temp_puzzle(Pro.convert.table_to_number(row, col, 6),kq);
                       set_answer(6);
                    }
                }
            });
  }
    private void jButton36ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton36ActionPerformed
        // TODO add your handling code here:
         int choss=this.edit_table.getSelectedRow();
       if(choss==-1)
       {
        JOptionPane.showMessageDialog(null, "You not choose any puzzle to be delete !","Error",JOptionPane.ERROR_MESSAGE);
       }else if(this.edit_table.getValueAt(choss, 0).toString().equals(""))
       {
        JOptionPane.showMessageDialog(null, "Have not any value for delete !","Error",JOptionPane.ERROR_MESSAGE);
       }else
       {
          Integer id=new Integer(this.edit_table.getValueAt(choss, 0).toString());
          int chos=JOptionPane.showConfirmDialog(null, "Do you want to delete this puzzle no "+id,"Congfig !", JOptionPane.YES_NO_OPTION);
          if(chos==0)
          {
                try {
                    boolean del = Database.edit_puzzle.delete(id);
                    if (del == true) {
                        JOptionPane.showMessageDialog(null, "Delete puzzle successful !");
                    } else {
                        JOptionPane.showMessageDialog(null, "Error ! Please try again !");
                    }
              }
                catch (Exception ex) {
                    Logger.getLogger(Admin.class.getName()).log(Level.SEVERE, null, ex);
                }
                  ResultSet res=Database.edit_puzzle.query_table();
            for (int i = 0; i < edit_table.getRowCount(); i++) {
            try {
                if (res.next()) {
                    edit_table.setValueAt(res.getObject(1), i, 0);
                    edit_table.setValueAt(res.getObject(2), i, 1);
                    edit_table.setValueAt(res.getObject(3), i, 2);
                    edit_table.setValueAt(res.getObject(4), i, 3);
                } else {
                    edit_table.setValueAt("", i, 0);
                    edit_table.setValueAt("", i, 1);
                    edit_table.setValueAt("", i, 2);
                    edit_table.setValueAt("", i, 3);
                }
            } catch (SQLException ex) {
                Logger.getLogger(Admin.class.getName()).log(Level.SEVERE, null, ex);
            }
            }
          }
          //System.out.println("deleting");
       }
    }//GEN-LAST:event_jButton36ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        JOptionPane.showMessageDialog(login, "Good Bye ! See you again");
        System.exit(0);
    }//GEN-LAST:event_jButton2ActionPerformed

    private void acc_de_s1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_acc_de_s1ItemStateChanged
        // TODO add your handling code here:
        if(evt.getStateChange()==evt.SELECTED)
        {
            try {
                ResultSet set = Database.account.getaccdetail(this.acc_de_s1.getSelectedItem().toString());
                while (set.next()) {
                    this.acc_de_t1.setText(set.getString(2));
                    this.acc_de_t2.setText(set.getString(3));
                    this.acc_de_t3.setText(set.getString(4));
                    this.acc_de_t4.setText(set.getString(5));
                }
            } catch (Exception ex) {
                Logger.getLogger(Admin.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_acc_de_s1ItemStateChanged

    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
        // TODO add your handling code here:
        this.acc_add_t1.setText("");
         this.acc_add_t2.setText("");
          this.acc_add_t3.setText("");
          this.acc_add_t4.setSelectedIndex(0);
    }//GEN-LAST:event_jButton6ActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        // TODO add your handling code here:
        this.acc_add.setVisible(false);
    }//GEN-LAST:event_jButton5ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
        String user=this.acc_add_t1.getText();
        String pass=this.acc_add_t2.getText();
        String note=this.acc_add_t3.getText();
        String type=this.acc_add_t4.getSelectedItem().toString();
        if(user.equals(""))
        {
            JOptionPane.showMessageDialog(acc_add, "Username not empty");
        }else if(pass.equals(""))
        {
             JOptionPane.showMessageDialog(acc_add, "Password not empty");
        }else
        {
            boolean resu=Database.account.addnew(user, pass, note, type);
            if(resu==true)
            {
                JOptionPane.showMessageDialog(acc_add, "An account have been addted");
                     this.acc_add_t1.setText("");
         this.acc_add_t2.setText("");
          this.acc_add_t3.setText("");
          this.acc_add_t4.setSelectedIndex(0);
            } else
           {
                JOptionPane.showMessageDialog(acc_add, "Error , try again later !");
                     this.acc_add_t1.setText("");
         this.acc_add_t2.setText("");
          this.acc_add_t3.setText("");
          this.acc_add_t4.setSelectedIndex(0);
            }
        }
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
        // TODO add your handling code here:
        this.acc_mana.setVisible(false);

    }//GEN-LAST:event_jButton11ActionPerformed

    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
        // TODO add your handling code here:
         try {
                ResultSet set = Database.account.getaccdetail(this.acc_ma_s1.getSelectedItem().toString());
                while (set.next()) {
                    this.acc_ma_t1.setText(set.getString(2));
                    this.acc_ma_t2.setText(set.getString(3));
                    this.acc_ma_t3.setText(set.getString(4));
                    this.acc_ma_t4.setSelectedItem(set.getString(5));
                }
                this.seten_acc_mana(true);
            } catch (Exception ex) {
                Logger.getLogger(Admin.class.getName()).log(Level.SEVERE, null, ex);
            }
    }//GEN-LAST:event_jButton9ActionPerformed

    private void acc_ma_b1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acc_ma_b1ActionPerformed
        // TODO add your handling code here:
        String id=this.acc_ma_s1.getSelectedItem().toString();
        String pass=this.acc_ma_t2.getText();
        String note=this.acc_ma_t3.getText();
        String type=this.acc_ma_t4.getSelectedItem().toString();
        if(pass.equals(""))
        {
             JOptionPane.showMessageDialog(acc_mana, "Password not empty");
        }else
        {
            boolean resu=Database.account.edit(id, pass, note, type);
            if(resu==true)
            {
                JOptionPane.showMessageDialog(acc_mana, "An account have been edit");
this.acc_mana.setVisible(false);
            } else
           {
                JOptionPane.showMessageDialog(acc_mana, "Error , try again later !");
                  this.acc_mana.setVisible(false);
            }
        }
    }//GEN-LAST:event_acc_ma_b1ActionPerformed

    private void acc_ma_b2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acc_ma_b2ActionPerformed
        // TODO add your handling code here:
        int cho=JOptionPane.showConfirmDialog(acc_mana, "Do you want to delete this account ?", "Is delete ?", JOptionPane.YES_NO_OPTION);
        if(cho==JOptionPane.YES_OPTION)
        {
        //delete account
            boolean kq=Database.account.delete(this.acc_ma_s1.getSelectedItem().toString());
            if(kq==true)
            {
                JOptionPane.showMessageDialog(acc_mana, "An account have been delete !");
                this.acc_mana.setVisible(false);
            }else
            {
                JOptionPane.showMessageDialog(acc_mana, "Error, try again !");
                this.acc_mana.setVisible(false);
            }
        }
    }//GEN-LAST:event_acc_ma_b2ActionPerformed

    private void jButton31ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton31ActionPerformed
        // TODO add your handling code here:
        ResultSet res=Database.edit_puzzle.query_table();
            for (int i = 0; i < edit_table.getRowCount(); i++) {
            try {
                if (res.next()) {
                    edit_table.setValueAt(res.getObject(1), i, 0);
                    edit_table.setValueAt(res.getObject(2), i, 1);
                    edit_table.setValueAt(res.getObject(3), i, 2);
                    edit_table.setValueAt(res.getObject(4), i, 3);
                } else {
                    edit_table.setValueAt("", i, 0);
                    edit_table.setValueAt("", i, 1);
                    edit_table.setValueAt("", i, 2);
                    edit_table.setValueAt("", i, 3);
                }
            } catch (SQLException ex) {
                Logger.getLogger(Admin.class.getName()).log(Level.SEVERE, null, ex);
            }
            }

          this.set_show_jlayer(puz_mama);
    }//GEN-LAST:event_jButton31ActionPerformed
   public Object[][] gettableobject_4(JTable ta)
    {
        Object[][] get=new Object[ta.getRowCount()][ta.getRowCount()];
        for (int i = 0; i < ta.getRowCount(); i++) {
            for (int j = 0; j < ta.getRowCount(); j++) {
                if(ta.getValueAt(i, j).equals(""))
                {
                    get[i][j]="";
                }else
                {
                get[i][j]=ta.getValueAt(i, j);
                }
            }
        }
        return get;
    }
       public Object[][] gettableobject(JTable ta)
    {
        Object[][] get=new Object[ta.getRowCount()][ta.getRowCount()];
        for (int i = 0; i < ta.getRowCount(); i++) {
            for (int j = 0; j < ta.getRowCount(); j++) {
                if(ta.getValueAt(i, j).equals(""))
                {
                    get[i][j]="";
                }else
                {
                get[i][j]=ta.getValueAt(i, j);
                }
            }
        }
        return get;
    }
    private void save4_queActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_save4_queActionPerformed
     if(this.new4_t1.getText().equals(""))
       {
            JOptionPane.showMessageDialog(null, "Question not null, Please enter question !");
       }else
       {
       int[] check=new int[temp_puzzle.size()];
       String[] value=new String[temp_puzzle.size()];
       String tong="";
       String posi="";
       boolean type=false;
       if(new4_b.isSelected()==true)
       {
              type=true;
       }
       String que=this.new4_t1.getText();
        //Sap xep lai vi tri cac o
       Object[] sorted=sort_puzzle(temp_puzzle.toArray());
        for (int i = 0; i < check.length; i++) {
            String[] cut=sorted[i].toString().split("-");
            check[i]=new Integer(cut[0]);
            value[i]=cut[1];
            tong=tong+cut[1];
            posi=posi+cut[0]+"-";
        }
       //kiem tra tinh hop le cua vi tri can luu
       //Check value input in table.
       int[] temp=check;
       Arrays.sort(temp);
       boolean result=Pro.checkvalied_table.check_4(temp, type, gettableobject_4(ta_4_4));
           //System.out.println("Ket qua cua bang la "+result);
       if(result==false)
       {
            JOptionPane.showMessageDialog(null, "Position not true ! ", "Error",JOptionPane.ERROR_MESSAGE);
            temp_puzzle.clear();
       }else if(result==true)
       {
           //get full value for input
           String[] re=Pro.checkvalied_table.getfulque(temp, type, gettableobject(ta_4_4), 4);
           posi=re[0];
           tong=re[1];
            for (int i = 0; i < check.length; i++) {
               int[] tam=Pro.convert.number_to_table(check[i], 4);
               con4[tam[0]][tam[1]]=value[i];
           }
            //Neu type== true =>Valatilly
            temp_ques.add(que+"&&"+tong+"&&"+posi+"&&"+type);
            System.out.println(que+"&&"+tong+"&&"+posi+"&&"+type);
            temp_puzzle.clear();
            //cai dat mac dinh lai cho cac truong, cho cau hoi moi
            //setup default value ,questions.
            this.new4_t1.setText("");
            this.new4_t2.setText("");
            Integer vitri=new Integer(this.posi.getText());
            vitri++;
            this.posi.setText(vitri.toString());
       }
       re_format_table(4);
       }
    }//GEN-LAST:event_save4_queActionPerformed
 //dinh dang lai table sao khi them cau hoi moi,....
    //format table after add question.
    public void re_format_table(int type)
{
    if(type==6)
    {
        canEdit = new boolean[head6.length][head6.length];
               for (int i = 0; i < head6.length; i++) {
                   for (int j = 0; j < head6.length; j++) {
                       if(con6[i][j].toString().equals(""))
                       {
                            canEdit[i][j]=true;
                       }else
                       {
                            canEdit[i][j]=false;
                       }
                   }
               }
    DefaultTableModel model = new DefaultTableModel(con6, head6) {
                @Override
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit[rowIndex][columnIndex];
                }
            };
            ta_6_6.setModel(model);
    ta_6_6.getModel().addTableModelListener(new TableModelListener() {

                @Override
                public void tableChanged(TableModelEvent e) {
                    //Event change in table
                    int row=e.getFirstRow();
                    int col=e.getColumn();
                    String kq=ta_6_6.getValueAt(row, col).toString();
                    if(kq.length()==0)
                    {}else
                    if(kq.length()>1)
                    {
                        JOptionPane.showMessageDialog(null, "Only allow 1 cheracter in cell !","Error",JOptionPane.ERROR_MESSAGE);
                        ta_6_6.setValueAt("", row, col);
                    }else
                    {
                        //temp_po.add(proces.convert.table_to_number(row, col, 6)+"-"+kq);
                        temp_puzzle(Pro.convert.table_to_number(row, col, 6),kq);
                        set_answer(6);
                    }
                }
            });
    }else
    {
        canEdit4 = new boolean[head4.length][head4.length];
               for (int i = 0; i < head4.length; i++) {
                   for (int j = 0; j < head4.length; j++) {
                       if(con4[i][j].toString().equals(""))
                       {
                            canEdit4[i][j]=true;
                       }else
                       {
                            canEdit4[i][j]=false;
                       }
                   }
               }
    //DefaultTableModel dai=new DefaultTableModel(noidung4, tieude4);
    //bang_4x4.setModel(dai);
    DefaultTableModel model = new DefaultTableModel(con4, head4) {
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit4[rowIndex][columnIndex];
                }
            };
            ta_4_4.setModel(model);
    ta_4_4.getModel().addTableModelListener(new TableModelListener() {

                @Override
                public void tableChanged(TableModelEvent e) {
                    //Event change in table
                    int row=e.getFirstRow();
                    int col=e.getColumn();
                    String kq=ta_4_4.getValueAt(row, col).toString();
                    if(kq.length()==0)
                    {}else
                    if(kq.length()>1)
                    {
                        JOptionPane.showMessageDialog(null, "Input is a character","Error",JOptionPane.ERROR_MESSAGE);
                        ta_4_4.setValueAt("", row, col);
                    }else
                    {
                        //temp_po.add(proces.convert.table_to_number(row, col, 4)+"-"+kq);
                        temp_puzzle(Pro.convert.table_to_number(row, col, 4),kq);
                        set_answer(4);
                    }
                }
            });
    }
}
    private void save6_queActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_save6_queActionPerformed
        // TODO add your handling code here:
         if(this.new6_t1.getText().equals(""))
       {
            JOptionPane.showMessageDialog(null, "Question not be null, Please enter question !");
       }else
       {
       int[] check=new int[temp_puzzle.size()];
       String[] value=new String[temp_puzzle.size()];
       String tong="";
       String posi="";
       boolean type=false;
       if(new6_b.isSelected()==true)
       {
              type=true;
       }
       String que=this.new6_t1.getText();
        //Sort  cell 's formation
       Object[] sorted=sort_puzzle(temp_puzzle.toArray());
        for (int i = 0; i < check.length; i++) {
            String[] cut=sorted[i].toString().split("-");
            check[i]=new Integer(cut[0]);
            value[i]=cut[1];
            tong=tong+cut[1];
            posi=posi+cut[0]+"-";
        }
       //kiem tra tinh hop le cua vi tri can luu
       //Check value of true add table.
       int[] temp=check;
       Arrays.sort(temp);
       boolean result=Pro.checkvalied_table.check_6(temp, type, gettableobject(ta_6_6));
       if(result==false)
       {
            JOptionPane.showMessageDialog(null, "Position not true ! ", "Error",JOptionPane.ERROR_MESSAGE);
            temp_puzzle.clear();
       }else if(result==true)
       {
           //get full value for input
           String[] re=Pro.checkvalied_table.getfulque(temp, type, gettableobject(ta_6_6), 6);
           posi=re[0];
           tong=re[1];
            for (int i = 0; i < check.length; i++) {
               int[] tam=Pro.convert.number_to_table(check[i], 6);
               con6[tam[0]][tam[1]]=value[i];
           }
            //Neu type== true =>Her
            temp_ques.add(que+"&&"+tong+"&&"+posi+"&&"+type);
            System.out.println(que+"&&"+tong+"&&"+posi+"&&"+type);
            temp_puzzle.clear();
            //setup default value ,questions.6x6
            this.new6_t1.setText("");
            this.new6_t2.setText("");
            Integer vitri=new Integer(this.posi_2.getText());
            vitri++;
            this.posi_2.setText(vitri.toString());
       }
       re_format_table(6);
       }
    }//GEN-LAST:event_save6_queActionPerformed

    private void jButton45ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton45ActionPerformed
        // TODO add your handling code here:
        this.save4_que.setEnabled(true);
        re_format_table(4);
    }//GEN-LAST:event_jButton45ActionPerformed

    private void jButton51ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton51ActionPerformed
        // TODO add your handling code here:
         this.save6_que.setEnabled(true);
        re_format_table(6);
    }//GEN-LAST:event_jButton51ActionPerformed

    private void jButton44ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton44ActionPerformed
        // TODO add your handling code here:
         this.save4_que.setEnabled(false);
        Object[][] data_temp=new Object[4][4];
           //Set * for an empty
          for (int k = 0; k < 4; k++) {
              for (int z = 0; z < 4; z++) {
                 data_temp[k][z]="*";
              }
        }
        for (int i = 0; i < temp_ques.size(); i++) {
            String[] temp=temp_ques.get(i).toString().split("&&");
            String[] te=temp[2].split("-");
            int[] kq=Pro.convert.number_to_table(new Integer(te[0]), 4);
            data_temp[kq[0]][kq[1]]=i+1;
            for (int j = 1; j < te.length; j++) {
                int[] kq2=Pro.convert.number_to_table(new Integer(te[j]), 4);
                data_temp[kq2[0]][kq2[1]]="";
            }
        }
           canEdit4 = new boolean[head4.length][head4.length];
               for (int i = 0; i < head4.length; i++) {
                   for (int j = 0; j < head4.length; j++) {
                            canEdit4[i][j]=false;
                   }
               }
    DefaultTableModel model = new DefaultTableModel(data_temp, head4) {
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit4[rowIndex][columnIndex];
                }
            };
            ta_4_4.setModel(model);
    }//GEN-LAST:event_jButton44ActionPerformed

    private void jButton50ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton50ActionPerformed
        // TODO add your handling code here:
         this.save6_que.setEnabled(false);
           Object[][] data_temp=new Object[6][6];
           //Set * for an empty
          for (int k = 0; k < 6; k++) {
              for (int z = 0; z < 6; z++) {
                 data_temp[k][z]="*";
              }
        }
        for (int i = 0; i < temp_ques.size(); i++) {
            String[] temp=temp_ques.get(i).toString().split("&&");
            String[] te=temp[2].split("-");
            int[] kq=Pro.convert.number_to_table(new Integer(te[0]), 6);
            data_temp[kq[0]][kq[1]]=i+1;
            for (int j = 1; j < te.length; j++) {
                int[] kq2=Pro.convert.number_to_table(new Integer(te[j]), 6);
                data_temp[kq2[0]][kq2[1]]="";
            }
        }

           canEdit = new boolean[head6.length][head6.length];
               for (int i = 0; i < head6.length; i++) {
                   for (int j = 0; j < head6.length; j++) {
                            canEdit[i][j]=false;
                   }
               }
    DefaultTableModel model = new DefaultTableModel(data_temp, head6) {
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit[rowIndex][columnIndex];
                }
            };
            ta_6_6.setModel(model);
    }//GEN-LAST:event_jButton50ActionPerformed

    private void jButton47ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton47ActionPerformed
        // TODO add your handling code here:
           temp_puzzle.clear();
        re_format_table(4);
        this.new4_t1.setText("");
    }//GEN-LAST:event_jButton47ActionPerformed

    private void jButton53ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton53ActionPerformed
        // TODO add your handling code here:
           temp_puzzle.clear();
        re_format_table(6);
                this.new6_t1.setText("");

    }//GEN-LAST:event_jButton53ActionPerformed

    private void jButton48ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton48ActionPerformed
        // TODO add your handling code here:
         int re=JOptionPane.showConfirmDialog(null, "Are you really want to save ?","Config",JOptionPane.YES_NO_OPTION);
        if(re==0)
        {
            if(temp_ques.size()<3)
            {
                JOptionPane.showMessageDialog(null, "Enter 3 or more questions","Error",JOptionPane.ERROR_MESSAGE);
            }else
            {
                save_puzzle obj=new save_puzzle();
                obj.save_puzle(this.new4_la1.getText(), 4, temp_ques, new4_la2.getText());
                JOptionPane.showMessageDialog(null, "Save successfully");
                //return default value.
                temp_ques.clear();
                temp_puzzle.clear();
                 this.set_show_main();
            }

        }
    }//GEN-LAST:event_jButton48ActionPerformed

    private void jButton49ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton49ActionPerformed
        // TODO add your handling code here:
         temp_ques.clear();
                temp_puzzle.clear();
                 this.set_show_main();
    }//GEN-LAST:event_jButton49ActionPerformed

    private void jButton54ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton54ActionPerformed
        // TODO add your handling code here:
          int re=JOptionPane.showConfirmDialog(null, "Are you really want to save ?","Config",JOptionPane.YES_NO_OPTION);
        if(re==0)
        {
            if(temp_ques.size()<4)
            {
                JOptionPane.showMessageDialog(null, "Enter 4 or more questions","Error",JOptionPane.ERROR_MESSAGE);
            }else
            {
                save_puzzle obj=new save_puzzle();
                obj.save_puzle(this.new6_la1.getText(), 6, temp_ques, new6_la2.getText());
                JOptionPane.showMessageDialog(null, "Save successfully");
                //return default value
                temp_ques.clear();
                temp_puzzle.clear();
                 this.set_show_main();
            }

        }
    }//GEN-LAST:event_jButton54ActionPerformed

    private void jButton55ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton55ActionPerformed
        // TODO add your handling code here:
             temp_ques.clear();
                temp_puzzle.clear();
                 this.set_show_main();
    }//GEN-LAST:event_jButton55ActionPerformed

    private void edit_tableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_edit_tableMouseClicked
        // TODO add your handling code here:
        Integer row=this.edit_table.getSelectedRow();
        if(edit_table.getValueAt(row, 0).equals(""))
        {}else
        {
            try {
                Integer value = new Integer(this.edit_table.getValueAt(row, 0).toString());
                //Get question content;
                ResultSet set = Database.edit_puzzle.contenr(value);
                String temp = "---"+"\n-----Full detail of puzzle----- "+value+"---";
                int posi=0;
                while (set.next()) {
                    posi++;
                    String que=set.getString(3);
                    String anw=set.getString(4);
                    String qtype="Vertically";
                    if(set.getInt(5)==0)
                    {
                        qtype="Horizontal";
                    }
                    temp=temp+"\n    "+posi+". "+que+". ( "+qtype+" )";
                    temp=temp+"\n           Asnwer: "+anw;
                    temp=temp+"\n           Position: "+set.getString(6);
                }
                set.close();
                this.edit_con.setText(temp);
            } catch (SQLException ex) {
                Logger.getLogger(Admin.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_edit_tableMouseClicked

    private void edit_table_listValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_edit_table_listValueChanged
        // TODO add your handling code here:
         if(this.edit_table_list.isSelectionEmpty()==false)
        {
        String gettext=edit_table_list.getSelectedValue().toString();
        String[] tam=gettext.split("---");
        String temp=Database.edit_puzzle_4.getdetail_forque(tam[1]);
        ecom_4_i1.setText(temp);
        }
    }//GEN-LAST:event_edit_table_listValueChanged

    private void edit_table_list6ValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_edit_table_list6ValueChanged
        // TODO add your handling code here:
         if(this.edit_table_list6.isSelectionEmpty()==false)
        {
        String gettext=edit_table_list6.getSelectedValue().toString();
        String[] tam=gettext.split("---");
        String temp=Database.edit_puzzle_6.getdetail_forque(tam[1]);
        ecom_6_i1.setText(temp);
        }
    }//GEN-LAST:event_edit_table_list6ValueChanged

    private void jButton39ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton39ActionPerformed
        // TODO add your handling code here:
        if(edit_table_list.isSelectionEmpty()==true)
        {
            JOptionPane.showMessageDialog(null, "No question selected !");
        }else
        {
            int chon=JOptionPane.showConfirmDialog(null, "Are you sure to delete this question !","Are you sure ?",JOptionPane.YES_NO_OPTION);
            if(chon==0)
            {
            String taa=edit_table_list.getSelectedValue().toString();
            String[] ques=taa.split("---");
            Database.edit_puzzle_4.delete_ques(ques[1]);
            //
            String id=ecom_4_t1.getText();
            con4=Database.edit_puzzle_4.getcellcontent(new Integer(id));
            edit_table_list.setListData(Database.edit_puzzle_4.getlistdata(new Integer(id)).toArray());
            //
            //reset_table(edit_bang_4x4);
             canEdit4 = new boolean[head4.length][head4.length];
           for (int i = 0; i < head4.length; i++) {
                   for (int j = 0; j < head4.length; j++) {
                    canEdit4[i][j]=false;
               }
               }
           DefaultTableModel model = new DefaultTableModel(con4, head4) {
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit4[rowIndex][columnIndex];
                }
            };
           edit_4_4.setModel(model);
           model_edit_4(edit_4_4);
        }
        }
    }//GEN-LAST:event_jButton39ActionPerformed

    private void jButton42ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton42ActionPerformed
        // TODO add your handling code here:
         if(edit_table_list6.isSelectionEmpty()==true)
        {
            JOptionPane.showMessageDialog(null, "No question selected !");
        }else
        {
            int chon=JOptionPane.showConfirmDialog(null, "Are you sure to delete this question !","Are you sure ?",JOptionPane.YES_NO_OPTION);
            if(chon==0)
            {
            String taa=edit_table_list6.getSelectedValue().toString();
            String[] ques=taa.split("---");
            Database.edit_puzzle_6.delete_ques(ques[1]);
            //
            String id=ecom_6_t1.getText();
            con6=Database.edit_puzzle_6.getcellcontent(new Integer(id));
            edit_table_list6.setListData(Database.edit_puzzle_6.getlistdata(new Integer(id)).toArray());
            //
            //reset_table(edit_bang_4x4);
             canEdit = new boolean[head6.length][head6.length];
           for (int i = 0; i < head6.length; i++) {
                   for (int j = 0; j < head6.length; j++) {
                    canEdit[i][j]=false;
               }
               }
           DefaultTableModel model = new DefaultTableModel(con6, head6) {
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit[rowIndex][columnIndex];
                }
            };
           edit_6_6.setModel(model);
           model_edit_6(edit_6_6);
        }
        }
    }//GEN-LAST:event_jButton42ActionPerformed

    private void jButton40ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton40ActionPerformed
        // TODO add your handling code here:
        set_show_jlayer(puz_mama);
    }//GEN-LAST:event_jButton40ActionPerformed

    private void jButton43ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton43ActionPerformed
        // TODO add your handling code here:
         set_show_jlayer(puz_mama);
    }//GEN-LAST:event_jButton43ActionPerformed
 public void reset_table(JTable ta)
    {
        con4=new Object[4][4];
        for (int i = 0; i < temp_ques.size(); i++) {
            String[] temp=temp_ques.get(i).toString().split("&&");
            String[] te=temp[2].split("-");
            int[] kq=Pro.convert.number_to_table(new Integer(te[0]), 4);
            String ans=temp[1];
            int add=1;
            if(temp[3].equals("false"))
            {
                add=4;
            }
            Integer first_index=new Integer(te[0]);
            char[] dai=ans.toCharArray();
            for (char c : dai) {
                int[] kq2=Pro.convert.number_to_table(first_index, 4);
                con4[kq2[0]][kq2[1]]=c;
                first_index=first_index+add;
            }
        }

           canEdit4 = new boolean[head4.length][head4.length];
               for (int i = 0; i < head4.length; i++) {
                   for (int j = 0; j < head4.length; j++) {
                            canEdit4[i][j]=false;
                   }
               }
    //DefaultTableModel dai=new DefaultTableModel(noidung4, tieude4);
    //bang_4x4.setModel(dai);
    DefaultTableModel model = new DefaultTableModel(con4, head4) {
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit4[rowIndex][columnIndex];
                }
            };
            edit_4_4.setModel(model);
    }
    public void reset_table6(JTable ta)
    {
        con6=new Object[6][6];
        for (int i = 0; i < temp_ques.size(); i++) {
            String[] temp=temp_ques.get(i).toString().split("&&");
            String[] te=temp[2].split("-");
            int[] kq=Pro.convert.number_to_table(new Integer(te[0]), 6);
            String ans=temp[1];
            int add=1;
            if(temp[3].equals("false"))
            {
                add=6;
            }
            Integer first_index=new Integer(te[0]);
            char[] dai=ans.toCharArray();
            for (char c : dai) {
                int[] kq2=Pro.convert.number_to_table(first_index, 6);
                con6[kq2[0]][kq2[1]]=c;
                first_index=first_index+add;
            }
        }

           canEdit = new boolean[head6.length][head6.length];
               for (int i = 0; i < head6.length; i++) {
                   for (int j = 0; j < head6.length; j++) {
                            canEdit[i][j]=false;
                   }
               }
    //DefaultTableModel dai=new DefaultTableModel(noidung6, tieude6);
    //bang_6x6.setModel(dai);
    DefaultTableModel model = new DefaultTableModel(con6, head6) {
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit[rowIndex][columnIndex];
                }
            };
            edit_6_6.setModel(model);
    }
    private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed
        // TODO add your handling code here:
        //
        if(Database.edit_puzzle.gettypeof_puzzle(edit_id)==4) {
            int chon=JOptionPane.showConfirmDialog(edit_queofpuzzle, "Are you sure to make change for this question !","Are you sure ?",JOptionPane.YES_NO_OPTION);
            if(chon==0) {
                int[] check=new int[temp_puzzle.size()];
                String[] value=new String[temp_puzzle.size()];
                String tong="";
                String posi="";
                String que=this.edit_ques_t1.getText();
                //Order cell
                Object[] sorted=sort_puzzle(temp_puzzle.toArray());
                for (int i = 0; i < check.length; i++) {
                    String[] cut=sorted[i].toString().split("-");
                    check[i]=new Integer(cut[0]);
                    value[i]=cut[1];
                    tong=tong+cut[1];
                    posi=posi+cut[0]+"-";
                }
                //check valid position
                int[] temp=check;
                Arrays.sort(temp);
                //bang6_t2.setText(tong);
                for (int i = 0; i < check.length; i++) {
                    int[] tam=Pro.convert.number_to_table(check[i], 4);
                    con4[tam[0]][tam[1]]=value[i];
                }
                //If type== true is Horizontal type of question
                //Integer inter=new Integer(edit_que_lab.getText());
                //inter--;
                //temp_ques.remove(inter);
                temp_ques.add(que+"&&"+tong+"&&"+posi);
                Database.edit_puzzle_4.update_que(que, tong, posi, edit_id);
                //Close this dialog box
                this.edit_queofpuzzle.setVisible(false);
                //reset list data
                temp_ques=Database.edit_puzzle_4.get_temp_ques(new Integer(ecom_4_t1.getText()));
                reset_table(edit_4_4);
                Object[] list_data=new Object[temp_ques.size()];
                for (int i = 0; i < temp_ques.size(); i++) {
                    String[] data=temp_ques.get(i).toString().split("&&");
                    list_data[i]=(i+1)+" ---"+data[0];
                }
                edit_table_list.setListData(list_data);
            }
        }else {
            int chon=JOptionPane.showConfirmDialog(edit_queofpuzzle, "Are you sure to make change for this question !","Are you sure ?",JOptionPane.YES_NO_OPTION);
            if(chon==0) {
                int[] check=new int[temp_puzzle.size()];
                String[] value=new String[temp_puzzle.size()];
                String tong="";
                String posi="";
                String que=this.edit_ques_t1.getText();
                //Order cell
                Object[] sorted=sort_puzzle(temp_puzzle.toArray());
                for (int i = 0; i < check.length; i++) {
                    String[] cut=sorted[i].toString().split("-");
                    check[i]=new Integer(cut[0]);
                    value[i]=cut[1];
                    tong=tong+cut[1];
                    posi=posi+cut[0]+"-";
                }
                //check valid position
                int[] temp=check;
                Arrays.sort(temp);
                //bang6_t2.setText(tong);
                for (int i = 0; i < check.length; i++) {
                    int[] tam=Pro.convert.number_to_table(check[i], 6);
                    con6[tam[0]][tam[1]]=value[i];
                }
                //If type== true is Horizontal type of question
                //Integer inter=new Integer(edit_que_lab.getText());
                //inter--;
                //temp_ques.remove(inter);
                temp_ques.add(que+"&&"+tong+"&&"+posi);
                Database.edit_puzzle_6.update_que(que, tong, posi, edit_id);
                //Close this dialog box
                this.edit_queofpuzzle.setVisible(false);
                //reset list data
                temp_ques=Database.edit_puzzle_6.get_temp_ques(new Integer(ecom_6_t1.getText()));
                reset_table6(edit_6_6);
                Object[] list_data=new Object[temp_ques.size()];
                for (int i = 0; i < temp_ques.size(); i++) {
                    String[] data=temp_ques.get(i).toString().split("&&");
                    list_data[i]=(i+1)+" ---"+data[0];
                }
                edit_table_list6.setListData(list_data);
            }
        }
}//GEN-LAST:event_jButton13ActionPerformed

    private void jButton32ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton32ActionPerformed
        // TODO add your handling code here:
        this.edit_queofpuzzle.setVisible(false);
}//GEN-LAST:event_jButton32ActionPerformed

    private void jButton38ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton38ActionPerformed
        // TODO add your handling code here:
          if(edit_table_list.isSelectionEmpty()==true)
        {
            JOptionPane.showMessageDialog(null, "No question selected !");
        }else
        {
             this.edit_queofpuzzle.setSize(530,380);
             this.edit_queofpuzzle.setLocationRelativeTo(null);
             this.edit_queofpuzzle.setAlwaysOnTop(true);
             this.edit_queofpuzzle.setVisible(true);
             /////
             int s_index=this.edit_table_list.getSelectedIndex();
             Integer index=s_index+1;
             this.edit_que_lab.setText(index.toString());
             String full_qus=temp_ques.get(s_index).toString();
             String[] cut=full_qus.split("&&");
             edit_ques_t1.setText(cut[0]);
             edit_ques_t2.setText(cut[1]);
             //set puzzle cells
             con4=new Object[4][4];
             for (int y = 0; y < 4; y++) {
                 for (int z = 0; z < cut.length; z++) {
                     con4[y][z]="";
                 }
            }
        for (int i = 0; i < temp_ques.size(); i++) {
            String[] temp=temp_ques.get(i).toString().split("&&");
            String[] te=temp[2].split("-");
            int[] kq=Pro.convert.number_to_table(new Integer(te[0]), 4);
            String ans=temp[1];
            int add=1;
            if(temp[3].equals("false"))
            {
                add=4;
            }
            Integer first_index=new Integer(te[0]);
            char[] dai=ans.toCharArray();
            for (char c : dai) {
                int[] kq2=Pro.convert.number_to_table(first_index, 4);
                con4[kq2[0]][kq2[1]]=c;
                first_index=first_index+add;
            }
        }

             this.model_edit_4(edit_ques_ta);
           String typeofque=Database.edit_puzzle_4.get_type(this.edit_ques_t1.getText());
           this.edit_que_lab2.setText(typeofque);
           ArrayList list_d=Database.edit_puzzle_4.get_opsi_ofques(this.edit_ques_t1.getText());
           canEdit4 = new boolean[head4.length][head4.length];
               for (int i = 0; i < head4.length; i++) {
                   for (int j = 0; j < head4.length; j++) {
                            canEdit4[i][j]=false;
                   }
               }
            for (Object object : list_d) {
                Integer in=new Integer(object.toString());
                int[] ta=Pro.convert.number_to_table(in, 4);
                canEdit4[ta[0]][ta[1]]=true;
            }
    DefaultTableModel model = new DefaultTableModel(con4, head4) {
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit4[rowIndex][columnIndex];
                }
            };
            edit_ques_ta.setModel(model);
            edit_ques_ta.getModel().addTableModelListener(new TableModelListener() {

                @Override
                public void tableChanged(TableModelEvent e) {
                    //Event change in table
                    int row=e.getFirstRow();
                    int col=e.getColumn();
                    String kq=edit_ques_ta.getValueAt(row, col).toString();
                    if(kq.length()==0)
                    {}else
                    if(kq.length()>1)
                    {
                        JOptionPane.showMessageDialog(edit_queofpuzzle, "You must input only one character !","Error",JOptionPane.ERROR_MESSAGE);
                        edit_ques_ta.setValueAt("", row, col);
                    }else
                    {
                        //temp_po.add(proces.convert.table_to_number(row, col, 4)+"-"+kq);
                        set_temp_po(Pro.convert.table_to_number(row, col, 4),kq);
                        //set answer                        
                        String ans="";
         //test
         Object[] tam=temp_puzzle.toArray();
         Object[] check=sort_puzzle(tam);
         for (int i = 0; i < check.length; i++) {
             String[] temp=check[i].toString().split("-");
             ans=ans+temp[1];
         }
         edit_ques_t2.setText(ans);
                    }
                }
            });
            edit_id=Database.edit_puzzle_4.get_puid(this.edit_ques_t1.getText());
            //set data from que to temp_po
            temp_puzzle=Database.edit_puzzle_4.get_temp_pe(this.edit_ques_t1.getText());
        }
    }//GEN-LAST:event_jButton38ActionPerformed

    private void jButton41ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton41ActionPerformed
        // TODO add your handling code here:
         if(edit_table_list6.isSelectionEmpty()==true)
        {
            JOptionPane.showMessageDialog(null, "No question selected !");
        }else
        {
             this.edit_queofpuzzle.setSize(530,380);
             this.edit_queofpuzzle.setLocationRelativeTo(null);
             this.edit_queofpuzzle.setAlwaysOnTop(true);
             this.edit_queofpuzzle.setVisible(true);
             /////
             int s_index=this.edit_table_list6.getSelectedIndex();
             Integer index=s_index+1;
             this.edit_que_lab.setText(index.toString());
             String full_qus=temp_ques.get(s_index).toString();
             String[] cut=full_qus.split("&&");
             edit_ques_t1.setText(cut[0]);
             edit_ques_t2.setText(cut[1]);
             //set puzzle cells
             con6=new Object[6][6];
             for (int y = 0; y < 6; y++) {
                 for (int z = 0; z < cut.length; z++) {
                     con6[y][z]="";
                 }
            }
        for (int i = 0; i < temp_ques.size(); i++) {
            String[] temp=temp_ques.get(i).toString().split("&&");
            String[] te=temp[2].split("-");
            int[] kq=Pro.convert.number_to_table(new Integer(te[0]), 6);
            String ans=temp[1];
            int add=1;
            if(temp[3].equals("false"))
            {
                add=6;
            }
            Integer first_index=new Integer(te[0]);
            char[] dai=ans.toCharArray();
            for (char c : dai) {
                int[] kq2=Pro.convert.number_to_table(first_index, 6);
                con6[kq2[0]][kq2[1]]=c;
                first_index=first_index+add;
            }
        }

            this.model_edit_6(edit_ques_ta);
           String typeofque=Database.edit_puzzle_6.get_type(this.edit_ques_t1.getText());
           this.edit_que_lab2.setText(typeofque);
           ArrayList list_d=Database.edit_puzzle_6.get_opsi_ofques(this.edit_ques_t1.getText());
           canEdit = new boolean[head6.length][head6.length];
               for (int i = 0; i < head6.length; i++) {
                   for (int j = 0; j < head6.length; j++) {
                            canEdit[i][j]=false;
                   }
               }
            for (Object object : list_d) {
                Integer in=new Integer(object.toString());
                int[] ta=Pro.convert.number_to_table(in, 6);
                canEdit[ta[0]][ta[1]]=true;
            }
    DefaultTableModel model = new DefaultTableModel(con6, head6) {
                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit[rowIndex][columnIndex];
                }
            };
            edit_ques_ta.setModel(model);
            edit_ques_ta.getModel().addTableModelListener(new TableModelListener() {

                @Override
                public void tableChanged(TableModelEvent e) {
                    //Event change in table
                    int row=e.getFirstRow();
                    int col=e.getColumn();
                    String kq=edit_ques_ta.getValueAt(row, col).toString();
                    if(kq.length()==0)
                    {}else
                    if(kq.length()>1)
                    {
                        JOptionPane.showMessageDialog(edit_queofpuzzle, "You must input only one character !","Error",JOptionPane.ERROR_MESSAGE);
                        edit_ques_ta.setValueAt("", row, col);
                    }else
                    {
                        //temp_po.add(proces.convert.table_to_number(row, col, 4)+"-"+kq);
                        set_temp_po(Pro.convert.table_to_number(row, col, 6),kq);
                        //set answer
                        
                        String ans="";
         //test
         Object[] tam=temp_puzzle.toArray();
         Object[] check=sort_puzzle(tam);
         for (int i = 0; i < check.length; i++) {
             String[] temp=check[i].toString().split("-");
             ans=ans+temp[1];
         }
         edit_ques_t2.setText(ans);
                    }
                }
            });
            edit_id=Database.edit_puzzle_6.get_puid(this.edit_ques_t1.getText());
            //set data from que to temp_po
            temp_puzzle=Database.edit_puzzle_6.get_temp_pe(this.edit_ques_t1.getText());
        }
    }//GEN-LAST:event_jButton41ActionPerformed

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
        // TODO add your handling code here:
        this.acc_detail.setVisible(false);
    }//GEN-LAST:event_jButton7ActionPerformed

    private void acc_add_t4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acc_add_t4ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_acc_add_t4ActionPerformed

    private void acc_de_s1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acc_de_s1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_acc_de_s1ActionPerformed
   public void set_temp_po(int index, String content)
    {
        boolean tontai=false;
        for (Object ob : temp_puzzle) {
            String[] temp=ob.toString().split("-");
            String tam=index+"";
            if(tam.equals(temp[0]))
            {
                tontai=true;
            }
        }
        if(tontai==false)
        {
            temp_puzzle.add(index+"-"+content);
        }
        else
        {
             for (int i = 0; i < temp_puzzle.size(); i++) {
 {
            String[] temp=temp_puzzle.get(i).toString().split("-");
            String tam=index+"";
            if(tam.equals(temp[0]))
            {
                Integer ex=new Integer(temp[0]);
                for (int l = 0; l < temp_puzzle.size(); l++) {
                    String[] ch=temp_puzzle.get(l).toString().split("-");
                    Integer abc=new Integer(ch[0]);
                    if(ex.equals(abc))
                    {
                        temp_puzzle.remove(l);
                    }
                }
                temp_puzzle.add(index+"-"+content);
            }
        }
        }
    }
    }
    public void seten_acc_mana(boolean enable)
    {
    this.acc_ma_t1.setEnabled(enable);
    this.acc_ma_t2.setEnabled(enable);
    this.acc_ma_t3.setEnabled(enable);
    this.acc_ma_t4.setEnabled(enable);
    this.acc_ma_b1.setEnabled(enable);
    this.acc_ma_b2.setEnabled(enable);
}
public void set_show_jlayer(JLayeredPane lay)
    {
        this.main.setVisible(false);
        this.edit_4.setVisible(false);
        this.edit_6.setVisible(false);
        this.puz_mama.setVisible(false);
        this.new4.setVisible(false);
        this.new6.setVisible(false);
        lay.setVisible(true);
}
public void set_show_main()
    {
this.edit_4.setVisible(false);
        this.edit_6.setVisible(false);
        this.puz_mama.setVisible(false);
        this.new4.setVisible(false);
        this.new6.setVisible(false);
        this.main.setVisible(true);
}
   
    public static void main(String args[]) {
        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        } catch (Exception ex) {
            Logger.getLogger(Admin.class.getName()).log(Level.SEVERE, null, ex);
        }
        Admin obj=new Admin();
            obj.login.setSize(470, 330);
            obj.login.setLocationRelativeTo(null);
            obj.login.setVisible(true);
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton acc_1;
    private javax.swing.JButton acc_2;
    private javax.swing.JButton acc_3;
    private javax.swing.JDialog acc_add;
    private javax.swing.JTextField acc_add_t1;
    private javax.swing.JTextField acc_add_t2;
    private javax.swing.JTextArea acc_add_t3;
    private javax.swing.JComboBox acc_add_t4;
    private javax.swing.JComboBox acc_de_s1;
    private javax.swing.JLabel acc_de_t1;
    private javax.swing.JLabel acc_de_t2;
    private javax.swing.JLabel acc_de_t3;
    private javax.swing.JLabel acc_de_t4;
    private javax.swing.JDialog acc_detail;
    private javax.swing.JButton acc_ma_b1;
    private javax.swing.JButton acc_ma_b2;
    private javax.swing.JComboBox acc_ma_s1;
    private javax.swing.JTextField acc_ma_t1;
    private javax.swing.JTextField acc_ma_t2;
    private javax.swing.JTextArea acc_ma_t3;
    private javax.swing.JComboBox acc_ma_t4;
    private javax.swing.JDialog acc_mana;
    private javax.swing.ButtonGroup bg_new4;
    private javax.swing.ButtonGroup bg_new6;
    private javax.swing.JTextArea ecom_4_i1;
    private javax.swing.JLabel ecom_4_t1;
    private javax.swing.JLabel ecom_4_t2;
    private javax.swing.JLabel ecom_4_t3;
    private javax.swing.JLabel ecom_4_t4;
    private javax.swing.JTextArea ecom_6_i1;
    private javax.swing.JLabel ecom_6_t1;
    private javax.swing.JLabel ecom_6_t2;
    private javax.swing.JLabel ecom_6_t3;
    private javax.swing.JLabel ecom_6_t4;
    private javax.swing.JLayeredPane edit_4;
    private javax.swing.JTable edit_4_4;
    private javax.swing.JLayeredPane edit_6;
    private javax.swing.JTable edit_6_6;
    private javax.swing.JTextArea edit_con;
    private javax.swing.JLabel edit_que_lab;
    private javax.swing.JLabel edit_que_lab2;
    private javax.swing.JDialog edit_queofpuzzle;
    private javax.swing.JTextPane edit_ques_t1;
    private javax.swing.JTextPane edit_ques_t2;
    private javax.swing.JTable edit_ques_ta;
    private javax.swing.JTable edit_table;
    private javax.swing.JList edit_table_list;
    private javax.swing.JList edit_table_list6;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton13;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton28;
    private javax.swing.JButton jButton29;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton30;
    private javax.swing.JButton jButton31;
    private javax.swing.JButton jButton32;
    private javax.swing.JButton jButton36;
    private javax.swing.JButton jButton37;
    private javax.swing.JButton jButton38;
    private javax.swing.JButton jButton39;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton40;
    private javax.swing.JButton jButton41;
    private javax.swing.JButton jButton42;
    private javax.swing.JButton jButton43;
    private javax.swing.JButton jButton44;
    private javax.swing.JButton jButton45;
    private javax.swing.JButton jButton47;
    private javax.swing.JButton jButton48;
    private javax.swing.JButton jButton49;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton50;
    private javax.swing.JButton jButton51;
    private javax.swing.JButton jButton53;
    private javax.swing.JButton jButton54;
    private javax.swing.JButton jButton55;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton9;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel100;
    private javax.swing.JLabel jLabel101;
    private javax.swing.JLabel jLabel107;
    private javax.swing.JLabel jLabel108;
    private javax.swing.JLabel jLabel109;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel110;
    private javax.swing.JLabel jLabel111;
    private javax.swing.JLabel jLabel112;
    private javax.swing.JLabel jLabel113;
    private javax.swing.JLabel jLabel114;
    private javax.swing.JLabel jLabel115;
    private javax.swing.JLabel jLabel117;
    private javax.swing.JLabel jLabel118;
    private javax.swing.JLabel jLabel119;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel120;
    private javax.swing.JLabel jLabel121;
    private javax.swing.JLabel jLabel129;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel130;
    private javax.swing.JLabel jLabel131;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel81;
    private javax.swing.JLabel jLabel82;
    private javax.swing.JLabel jLabel83;
    private javax.swing.JLabel jLabel84;
    private javax.swing.JLabel jLabel86;
    private javax.swing.JLabel jLabel87;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabel93;
    private javax.swing.JLabel jLabel94;
    private javax.swing.JLabel jLabel95;
    private javax.swing.JLabel jLabel97;
    private javax.swing.JLabel jLabel98;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel34;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane15;
    private javax.swing.JScrollPane jScrollPane16;
    private javax.swing.JScrollPane jScrollPane17;
    private javax.swing.JScrollPane jScrollPane18;
    private javax.swing.JScrollPane jScrollPane19;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane20;
    private javax.swing.JScrollPane jScrollPane21;
    private javax.swing.JScrollPane jScrollPane22;
    private javax.swing.JScrollPane jScrollPane23;
    private javax.swing.JScrollPane jScrollPane24;
    private javax.swing.JScrollPane jScrollPane25;
    private javax.swing.JScrollPane jScrollPane26;
    private javax.swing.JScrollPane jScrollPane27;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTextField log_t1;
    private javax.swing.JPasswordField log_t2;
    private javax.swing.JComboBox log_t3;
    private javax.swing.JDialog login;
    private javax.swing.JPanel main;
    private javax.swing.JLabel main_lab;
    private javax.swing.JLayeredPane new4;
    private javax.swing.JRadioButton new4_a;
    private javax.swing.JRadioButton new4_b;
    private javax.swing.JLabel new4_la1;
    private javax.swing.JLabel new4_la2;
    private javax.swing.JTextArea new4_t1;
    private javax.swing.JTextField new4_t2;
    private javax.swing.JLayeredPane new6;
    private javax.swing.JRadioButton new6_a;
    private javax.swing.JRadioButton new6_b;
    private javax.swing.JLabel new6_la1;
    private javax.swing.JLabel new6_la2;
    private javax.swing.JTextArea new6_t1;
    private javax.swing.JTextField new6_t2;
    private javax.swing.JLabel posi;
    private javax.swing.JLabel posi_2;
    private javax.swing.JLayeredPane puz_mama;
    private javax.swing.JButton save4_que;
    private javax.swing.JButton save6_que;
    private javax.swing.JTable ta_4_4;
    private javax.swing.JTable ta_6_6;
    // End of variables declaration//GEN-END:variables

}
